summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby- <robby@chat.be>2014-05-30 18:27:15 +0200
committerRobby- <robby@chat.be>2014-05-30 18:27:15 +0200
commitdc4daa25a7abbe8f2b547a29907b8915cd700bc6 (patch)
tree82c960e9ee44a5920ddf63cf259fdb58c16679a7
parent0cadaedfbea0cb9ae23e869405c7ed74e0573fca (diff)
example.chk: Use a more reliable way to detect if services are running.
-rw-r--r--data/example.chk3
1 files changed, 2 insertions, 1 deletions
diff --git a/data/example.chk b/data/example.chk
index fbbf4847e..119b1ca99 100644
--- a/data/example.chk
+++ b/data/example.chk
@@ -37,7 +37,8 @@ cd $ANOPATH
if [ -f "$ANODATA/$ANOPIDF" ]
then
ANOPID=`cat "$ANODATA/$ANOPIDF"`
- if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
+ kill -0 $ANOPID 2>/dev/null
+ if [ $? -eq 0 ]
then
exit
fi