[SCM] icecast2/master: d/icecast2.init: Don't cancel on the stop target. (Closes: #740666)
unit193-guest at users.alioth.debian.org
unit193-guest at users.alioth.debian.org
Sat May 17 02:30:46 UTC 2014
The following commit has been merged in the master branch:
commit 909cf51e5d541f9926118276a4acb283e2393274
Author: Unit 193 <unit193 at ubuntu.com>
Date: Thu May 15 20:07:57 2014 -0400
d/icecast2.init: Don't cancel on the stop target. (Closes: #740666)
diff --git a/debian/icecast2.init b/debian/icecast2.init
index 84fecd9..84fc2db 100644
--- a/debian/icecast2.init
+++ b/debian/icecast2.init
@@ -6,7 +6,7 @@
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Icecast2 streaming media server
-# Description: Starts the icecast audio streaming server daemon
+# Description: Starts the icecast audio streaming server daemon
### END INIT INFO
#
# icecast2
@@ -38,18 +38,19 @@ ENABLE="false"
# Reads config file (will override defaults above)
[ -r "$CONFIGDEFAULTFILE" ] && . $CONFIGDEFAULTFILE
-if [ "$ENABLE" != "true" ]; then
- echo "$NAME daemon disabled - read $CONFIGDEFAULTFILE."
- exit 0
-fi
-
set -e
+cancel() { log_failure_msg "$NAME daemon is disabled - read $CONFIGDEFAULTFILE"; };
+
case "$1" in
start)
log_daemon_msg "Starting $DESC" "$NAME"
- start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
- --exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
+ if [ "$ENABLE" != "true" ];then
+ cancel
+ else
+ start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
+ --exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
+ fi
log_end_msg $?
;;
stop)
@@ -60,15 +61,23 @@ case "$1" in
;;
reload|force-reload)
log_daemon_msg "Reloading $DESC configuration" "$NAME"
- start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+ if [ "$ENABLE" != "true" ];then
+ cancel
+ else
+ start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+ fi
log_end_msg $?
;;
restart)
log_daemon_msg "Restarting $DESC" "$NAME"
- # Send TERM after 5 seconds, wait at most 30 seconds.
- start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --exec $DAEMON
- start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
- --exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
+ if [ "$ENABLE" != "true" ];then
+ cancel
+ else
+ # Send TERM after 5 seconds, wait at most 30 seconds.
+ start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --exec $DAEMON
+ start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
+ --exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
+ fi
log_end_msg $?
;;
status)
--
icecast2 packaging
More information about the pkg-multimedia-commits
mailing list