X-Git-Url: https://git.tld-linux.org/?p=packages%2Fpostgresql.git;a=blobdiff_plain;f=postgresql.init;h=394692c0f613a51b3eed459a47acbdcdfbefc58c;hp=8f308171836413e5dd01472b7f7de22c59985606;hb=0e7386e6d2212c4518a15908557116feaabe1e13;hpb=a6aaf40a53ea1e550e99c787c07a60a0255149cd diff --git a/postgresql.init b/postgresql.init index 8f30817..394692c 100644 --- a/postgresql.init +++ b/postgresql.init @@ -123,7 +123,7 @@ start() { if [ "$PG_STATUS" = "running" ]; then # pg_ctl status can misinform us about postgresql status # so let's check if postmaster is really alive - if ps -p "$PG_PID" >/dev/null; then + if ps -p "$PG_PID" 1>/dev/null 2>&1; then msg_already_running "PostgreSQL $pgdir" else # pg_ctl has misinformed us about postgresql status; @@ -148,8 +148,8 @@ stop() { msg_stopping "PostgreSQL $pgdir" busy # is postgresql really alive? - if ps -p "$PG_PID" >/dev/null; then - TMPDIR=/tmp su postgres -c "@pgsqlbindir@/pg_ctl -w -D $pgdir stop -m fast 2>&1 >/dev/null" + if ps -p "$PG_PID" 1>/dev/null 2>&1; then + TMPDIR=/tmp su postgres -c "@pgsqlbindir@/pg_ctl -w -D $pgdir stop -m fast 1>/dev/null 2>&1" pgstatus "$pgdir" if [ "$PG_STATUS" != "not running" ]; then fail @@ -214,8 +214,8 @@ case "$action" in msg_reloading "PostgreSQL $pgdir" busy # is postgresql really alive? - if ps -p "$PG_PID" >/dev/null; then - TMPDIR=/tmp su postgres -c "@pgsqlbindir@/pg_ctl -D $pgdir $pgctlact 2>&1 >/dev/null" + if ps -p "$PG_PID" 1>/dev/null 2>&1; then + TMPDIR=/tmp su postgres -c "@pgsqlbindir@/pg_ctl -D $pgdir $pgctlact 1>/dev/null 2>&1" pgstatus "$pgdir" if [ "$PG_STATUS" = "running" ]; then ok