Don't rely on result of ps -C as it only works for command with names shorter merge_rc1_src_1
authorDaniel Kouřil <kouril@ics.muni.cz>
Wed, 23 Mar 2005 12:26:53 +0000 (12:26 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Wed, 23 Mar 2005 12:26:53 +0000 (12:26 +0000)
then eight characters. Use netstat to detect if the daemon is running. (Fixes
#6633)

org.glite.security.proxyrenewal/config/startup
org.glite.security.proxyrenewal/project/version.properties

index dfca180..26ba757 100755 (executable)
@@ -56,25 +56,18 @@ start()
 stop()
 {
        echo -n "Stopping ProxyRenewal Daemon: glite-proxy-renewd ..."
-       PIDS=`ps -C glite-proxy-renewd -o pid --no-heading`
-       if [ -z "$PIDS" ]; then
-               echo " no process glite-proxy-renewd running"
-               exit 1
-       else
-               kill $PIDS && echo " done"
-       fi
+       killall glite-proxy-renewd
+       echo " done"
 }
 
 status()
 {
-       PIDS=`ps -C glite-proxy-renewd -o pid --no-heading`
-       if ps p $PIDS >/dev/null 2>&1; then
-               echo glite-proxy-renewd running \($PIDS\)
-               return 0
+       if netstat -an --unix | grep "^unix .* LISTEN.* /tmp/dgpr_renew_" >/dev/null 2>&1 ;then
+               echo glite-proxy-renewd running
+       else
+               echo glite-proxy-renewd not running
+               return 1
        fi
-       
-       echo glite-proxy-renewd not running
-       return 1
 }
 
 case x$1 in
index afada2b..c744014 100644 (file)
@@ -1,4 +1,4 @@
 
-module.version = 1.0.10
+module.version = 1.0.11
 module.age = 1