From 81e32cec36291685b59102594c714d235726e214 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Thu, 30 Jul 2026 19:57:29 +0200 Subject: add package pgruntime --- pgruntime/tool_template.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pgruntime/tool_template.sh (limited to 'pgruntime/tool_template.sh') diff --git a/pgruntime/tool_template.sh b/pgruntime/tool_template.sh new file mode 100644 index 0000000..d0ddea1 --- /dev/null +++ b/pgruntime/tool_template.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -euo pipefail + +stop_postgres() { + EXIT_CODE=$? + pg_ctl stop --wait --silent -D .testdb/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 +$COMMAND -U postgres -h 127.0.0.1 -p 54320 "$@" -- cgit v1.3.1