mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Use gosu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user