Skip to content

Commit

Permalink
Merge pull request #131 from bacongobbler/refactor-is-running
Browse files Browse the repository at this point in the history
fix(rootfs): check if recovery.conf is present
  • Loading branch information
Matthew Fisher authored Aug 1, 2016
2 parents b66069b + 38f839a commit 03584ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rootfs/bin/is_running
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@
# fail fast
set -e

# check if database is running
if [[ -f "$PGDATA/recovery.conf" ]]; then
# postgres is in recovery mode, so we know it's not ready to accept incoming connections.
exit 1
fi

gosu postgres pg_ctl status

0 comments on commit 03584ca

Please sign in to comment.