mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Add healthcheckscript for postgres
This commit is contained in:
7
postgres_15/rootfs/usr/local/bin/healthcheck.sh
Normal file
7
postgres_15/rootfs/usr/local/bin/healthcheck.sh
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
POSTGRES_USER="$(bashio::config "POSTGRES_USER" "postgres")"
|
||||
POSTGRES_DB="$(bashio::config "POSTGRES_DB" "$POSTGRES_USER")"
|
||||
|
||||
pg_isready --dbname="${POSTGRES_DB}" --username="${POSTGRES_USER}" || exit $?;
|
||||
Reference in New Issue
Block a user