[Pkg-voip-commits] [SCM] reSIProcate branch, master, updated. debian/1.8.2-1-21-ga7dd4fa

Daniel Pocock daniel at pocock.com.au
Mon Aug 6 19:03:19 UTC 2012


The following commit has been merged in the master branch:
commit a7dd4fad6b957df2255764748c75746a3e7e5f84
Author: Daniel Pocock <daniel at pocock.com.au>
Date:   Mon Aug 6 21:03:10 2012 +0200

    tweak init/stop method to wait for repro to really stop

diff --git a/debian/repro.init b/debian/repro.init
index 2921b8e..0f8a84e 100644
--- a/debian/repro.init
+++ b/debian/repro.init
@@ -19,6 +19,8 @@ PIDFILE="/var/run/$NAME/$NAME.pid"
 #PIDFILE="/var/run/${NAME}.pid"
 PIDFILE_DIR=`dirname $PIDFILE`
 
+KILL_SPEC=TERM/20/KILL/5
+
 test -x $DAEMON || exit 1
 umask 002
 
@@ -44,7 +46,7 @@ case "$1" in
 	;;
   stop)
 	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --quiet --oknodo --user $USER --pidfile $PIDFILE --exec $DAEMON
+	start-stop-daemon --stop --quiet --oknodo --user $USER --pidfile $PIDFILE --retry=${KILL_SPEC} --exec $DAEMON
 	echo "$NAME."
 	;;
   status)
@@ -65,7 +67,6 @@ case "$1" in
 	echo -n "Restarting $DESC: "
 	#start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE --exec $DAEMON
 	$0 stop
-	sleep 10
 	#start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_OPTS
 	$0 start
 	echo "$NAME."
diff --git a/debian/repro.postrm b/debian/repro.postrm
index 16be5c7..827d295 100644
--- a/debian/repro.postrm
+++ b/debian/repro.postrm
@@ -4,10 +4,6 @@ set -e
 
 if [ "$1" = "purge" ] ; then
 
-        # wait in case process still shutting down...
-        echo "Waiting for process to stop..."
-        sleep 8
-
         # MySQL uses debconf to get user confirmation before
         # wiping it's lib database directory, a similar
         # approach might be desirable for repro

-- 
reSIProcate



More information about the Pkg-voip-commits mailing list