[Pkg-icecast-devel] Bug#533182: icecast2: "sleep 1" hack in init script doesn't work

Michael Goetze mgoetze at mgoetze.net
Mon Jun 15 13:09:23 UTC 2009


Package: icecast2
Version: 2.3.2-2~bpo40+1
Severity: normal
Tags: patch

The "sleep 1" hack used in restarting icecast with the init script 
almost never works for me. This is quite a problem for me because I need 
icecast to stay up after an update. Therefore, I have modified the init 
script as follows:


--- icecast2	2009-06-15 14:38:31.000000000 +0200
+++ /etc/init.d/icecast2	2009-06-15 14:39:29.000000000 +0200
@@ -17,6 +17,8 @@
  #		Further modified by Keegan Quinn <ice at thebasement.org>
  #		for use with Icecast 2
  #
+#		Modified by Michael Goetze <mgoetze at mgoetze.net>
+#		Use --retry option to start-stop-daemon

  PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  DAEMON=/usr/bin/icecast2
@@ -51,7 +53,7 @@
  	;;
    stop)
  	echo -n "Stopping $DESC: "
-	start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
+	start-stop-daemon --stop --oknodo --retry TERM/5/KILL/10 --quiet 
--exec $DAEMON
  	echo "$NAME."
  	;;
    reload|force-reload)
@@ -60,8 +62,7 @@
  	;;
    restart)
  	echo -n "Restarting $DESC: "
-	start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
-	sleep 1
+	start-stop-daemon --stop --oknodo --retry TERM/5/KILL/10 --quiet 
--exec $DAEMON
  	start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
  		--exec $DAEMON -- -b -c $CONFIGFILE
  	echo "$NAME."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-icecast-devel/attachments/20090615/1dd0bf92/attachment.pgp>


More information about the Pkg-icecast-devel mailing list