mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-07 08:05:57 +02:00
Use gosu
This commit is contained in:
@@ -35,7 +35,7 @@ chmod -R 777 "$CONFIG_HOME"
|
|||||||
# Function to handle SIGTERM
|
# Function to handle SIGTERM
|
||||||
function shutdown_postgres {
|
function shutdown_postgres {
|
||||||
echo "Received SIGTERM, shutting down PostgreSQL..."
|
echo "Received SIGTERM, shutting down PostgreSQL..."
|
||||||
pg_ctl -D "$PGDATA" -m fast stop
|
gosu postgres pg_ctl -D "$PGDATA" -m fast stop
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
trap 'shutdown_postgres' SIGTERM
|
trap 'shutdown_postgres' SIGTERM
|
||||||
|
|||||||
Reference in New Issue
Block a user