Skip to content

Commit 03584ca

Browse files
author
Matthew Fisher
authored
Merge pull request #131 from bacongobbler/refactor-is-running
fix(rootfs): check if recovery.conf is present
2 parents b66069b + 38f839a commit 03584ca

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

rootfs/bin/is_running

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,9 @@
33
# fail fast
44
set -e
55

6-
# check if database is running
6+
if [[ -f "$PGDATA/recovery.conf" ]]; then
7+
# postgres is in recovery mode, so we know it's not ready to accept incoming connections.
8+
exit 1
9+
fi
10+
711
gosu postgres pg_ctl status

0 commit comments

Comments
 (0)