From 92f606c119b0f5da6adffa22ea1631c25a281d14 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:37:31 +0100 Subject: [PATCH] Use gosu --- postgres/rootfs/etc/cont-init.d/99-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres/rootfs/etc/cont-init.d/99-run.sh b/postgres/rootfs/etc/cont-init.d/99-run.sh index 7318f31ba..605ee88da 100755 --- a/postgres/rootfs/etc/cont-init.d/99-run.sh +++ b/postgres/rootfs/etc/cont-init.d/99-run.sh @@ -35,7 +35,7 @@ chmod -R 777 "$CONFIG_HOME" # Function to handle SIGTERM function shutdown_postgres { echo "Received SIGTERM, shutting down PostgreSQL..." - pg_ctl -D "$PGDATA" -m fast stop + gosu postgres pg_ctl -D "$PGDATA" -m fast stop exit 0 } trap 'shutdown_postgres' SIGTERM