X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=debian%2Fmetaproxy.init;h=3f19eee2e6873641cc6fe8ff3c9ca90fc34d5e3d;hb=d0e2b3b30cc34fb84b947d079a605cce2019539f;hp=1bbcfd7f5d19772c823d2fd24fba340090ac0c93;hpb=4e5866e906b8bea8ca01e62ca83af9aed9c794ff;p=metaproxy-moved-to-github.git 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