From 81f90a08f9a6dc1a850293d09ecb87ae27311e35 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 25 May 2012 10:38:47 +0200 Subject: [PATCH] Debian: remove pidfile in metaproxy reload process --- debian/metaproxy.init | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 1.7.10.4