This commit is contained in:
Alexandre
2024-12-02 20:37:31 +01:00
committed by GitHub
parent f79e7ceb20
commit 92f606c119

View File

@@ -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