From e26a214de3958e48e94cdac0e1ae0641e3221deb Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 31 Jul 2026 23:08:39 +0200 Subject: pgruntime: allow overriding .testdb path --- pgruntime/tool_template.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pgruntime/tool_template.sh') diff --git a/pgruntime/tool_template.sh b/pgruntime/tool_template.sh index d0ddea1..7e3827f 100644 --- a/pgruntime/tool_template.sh +++ b/pgruntime/tool_template.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash set -euo pipefail +cd "$(dirname "$0")" stop_postgres() { EXIT_CODE=$? - pg_ctl stop --wait --silent -D .testdb/datadir + pg_ctl stop --wait --silent -D datadir exit "${EXIT_CODE}" } trap stop_postgres EXIT INT TERM -rm -f -- .testdb/run/postgresql.log -pg_ctl start --wait --silent -D .testdb/datadir -l .testdb/run/postgresql.log +rm -f -- run/postgresql.log +pg_ctl start --wait --silent -D datadir -l run/postgresql.log $COMMAND -U postgres -h 127.0.0.1 -p 54320 "$@" -- cgit v1.3.1