From: Adam Dickmeiss Date: Fri, 25 May 2012 08:38:47 +0000 (+0200) Subject: Debian: remove pidfile in metaproxy reload process X-Git-Tag: v1.3.37~12 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=81f90a08f9a6dc1a850293d09ecb87ae27311e35;p=metaproxy-moved-to-github.git Debian: remove pidfile in metaproxy reload process --- diff --git a/debian/metaproxy.init b/debian/metaproxy.init index 1bbcfd7..3f19eee 100644 --- a/debian/metaproxy.init +++ b/debian/metaproxy.init @@ -91,8 +91,12 @@ do_reload() { # start-stop-daemon --stop --signal USR1 --quiet --pidfile $PIDFILE --name $NAME RETVAL="$?" + # Return if daemon could not be stopped + [ "$RETVAL" = 2 ] && return 2 + # daemon not running or stopped + rm -f $PIDFILE + # Return if it was not running, in which case we don't start it [ "$RETVAL" = 1 ] && return 0 - [ "$RETVAL" != 0 ] && return $RETVAL start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_OPTS \ || return 2