From: Daniel KouĊ™il Date: Wed, 23 Mar 2005 12:26:53 +0000 (+0000) Subject: Don't rely on result of ps -C as it only works for command with names shorter X-Git-Tag: merge_rc1_src_1 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=38f2e8165a9b84e960d4828b08d398157a00d584;p=jra1mw.git Don't rely on result of ps -C as it only works for command with names shorter then eight characters. Use netstat to detect if the daemon is running. (Fixes #6633) --- diff --git a/org.glite.security.proxyrenewal/config/startup b/org.glite.security.proxyrenewal/config/startup index dfca180..26ba757 100755 --- a/org.glite.security.proxyrenewal/config/startup +++ b/org.glite.security.proxyrenewal/config/startup @@ -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 diff --git a/org.glite.security.proxyrenewal/project/version.properties b/org.glite.security.proxyrenewal/project/version.properties index afada2b..c744014 100644 --- a/org.glite.security.proxyrenewal/project/version.properties +++ b/org.glite.security.proxyrenewal/project/version.properties @@ -1,4 +1,4 @@ -module.version = 1.0.10 +module.version = 1.0.11 module.age = 1