From d52ba097696b2ae1c3695b9b4f3f9f3ee570e2e8 Mon Sep 17 00:00:00 2001 From: fess Date: Fri, 19 Aug 2016 18:17:03 -0700 Subject: [PATCH] fix init script to actually check status flip sense of the check that pid in pid file matches pid in process list. --- templates/init.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/init.erb b/templates/init.erb index 970003f1..0c895115 100644 --- a/templates/init.erb +++ b/templates/init.erb @@ -113,7 +113,7 @@ status() { fi PID=`cat "$PID_FILE"` - if [ `ps -p "$PID" -o pid= || echo 1` -eq `pgrep -f "$PGREP_PATTERN" || echo 2` ] ; then + if [ `ps -p "$PID" -o pid= || echo 1` -ne `pgrep -f "$PGREP_PATTERN" || echo 2` ] ; then echo "$NAME stopped but pid file exists" exit 1 fi