From: František Dvořák Date: Tue, 5 Oct 2010 14:54:02 +0000 (+0000) Subject: Fix the status in startup script due to disabled daemons. X-Git-Tag: glite-lbjp-common-gsoap-plugin_R_3_0_0_1~4 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b9d133970686b5313b017f5fa924f09ae6418ede;p=jra1mw.git Fix the status in startup script due to disabled daemons. --- diff --git a/org.glite.lb.server/config/startup b/org.glite.lb.server/config/startup index d0a6ce9..22bc30d 100755 --- a/org.glite.lb.server/config/startup +++ b/org.glite.lb.server/config/startup @@ -92,18 +92,24 @@ status_daemon() { local name="$1" local pidfile="$2" + local enabled="$3" if [ -f "$pidfile" ]; then pid=`cat "$pidfile"` if kill -0 $pid >/dev/null 2>&1; then - echo $name running as $pid + echo "$name running as $pid" else - echo $name not running + echo "$name not running (stalled pidfile)" return 1 fi else - echo $name not running - return 1 + if test -n "$enabled" -a x"$enabled" = x"0"; then + echo "$name not running (disabled)" + return 0 + else + echo "$name not running" + return 1 + fi fi return 0 @@ -256,14 +262,20 @@ stop() status() { retval=0 - - status_daemon "glite-lb-notif-interlogd" "$NOTIF_IL_PIDFILE" || retval=1 - status_daemon "glite-lb-interlogd for proxy" "$PROXY_IL_PIDFILE" || retval=1 - - status_daemon "glite-lb-bkserverd" "$BK_PIDFILE" || retval=1 - if test x"$GLITE_LB_EXPORT_ENABLED" = x"true"; then - status_daemon "glite-jp-importer" "$jp_importer_pidfile" || retval=1 - fi + proxy=0 + jp=0 + test x"$GLITE_LB_TYPE" = x"proxy" -o x"$GLITE_LB_TYPE" = x"both" \ + && proxy=1 + test x"$GLITE_LB_EXPORT_ENABLED" = x"true" && jp=1 + + status_daemon "glite-lb-notif-interlogd" "$NOTIF_IL_PIDFILE" \ + || retval=1 + status_daemon "glite-lb-interlogd for proxy" "$PROXY_IL_PIDFILE" \ + $proxy || retval=1 + status_daemon "glite-lb-bkserverd" "$BK_PIDFILE" \ + || retval=1 + status_daemon "glite-jp-importer" "$jp_importer_pidfile" $jp \ + || retval=1 return $retval }