all-in-one/Containers/postgresql/healthcheck.sh
Simon L 394b899578 postgresql - improve database online check during the migration
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-02-17 11:50:09 +01:00

6 lines
178 B
Bash

#!/bin/bash
test -f "/mnt/data/backup-is-running" && exit 0
psql -d "postgresql://oc_$POSTGRES_USER:$POSTGRES_PASSWORD@localhost:5432/$POSTGRES_DB" -c "select now()" || exit 1