diff options
Diffstat (limited to 'pgruntime/tool_template.sh')
| -rw-r--r-- | pgruntime/tool_template.sh | 7 |
1 files changed, 4 insertions, 3 deletions
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 "$@" |
