From: mis Date: Sat, 18 Feb 2017 13:48:01 +0000 (+0100) Subject: - fix: pg_ctl exits with 3 if postgres is not running X-Git-Tag: auto/th/postgresql-9.6.3-1~1 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=206d9ac703f82ccef75d5f5944badcb6be3e5ca2;p=packages%2Fpostgresql.git - fix: pg_ctl exits with 3 if postgres is not running --- diff --git a/postgresql.init b/postgresql.init index d3476e2..647f2ec 100644 --- a/postgresql.init +++ b/postgresql.init @@ -76,7 +76,7 @@ pgstatus() { output=$(LC_ALL=C TMPDIR=/tmp su postgres -c "/usr/bin/pg_ctl -D $1 status") status=$? - if [ $status -eq 1 ]; then + if [ $status -eq 3 ]; then PG_STATUS="not running" elif [ $status -eq 0 ]; then PG_STATUS="running"