[SCM] icecast2/master: Update init script and add status option. Closes: #742798
unit193-guest at users.alioth.debian.org
unit193-guest at users.alioth.debian.org
Tue Apr 15 00:55:25 UTC 2014
The following commit has been merged in the master branch:
commit 168feaef802cac44c859364127730f395a872ee2
Author: Unit 193 <unit193 at ubuntu.com>
Date: Mon Apr 14 20:41:43 2014 -0400
Update init script and add status option. Closes: #742798
This switches to using log_daemon_msg and log_end_msg output. It directs output to /dev/null when starting because icecast has output when starting.
This also sets DESC to "streaming media server", and adds the "Description" field.
diff --git a/debian/icecast2.default b/debian/icecast2.default
index d45f5d0..04e5a71 100644
--- a/debian/icecast2.default
+++ b/debian/icecast2.default
@@ -16,4 +16,3 @@ GROUPID=icecast
# Edit /etc/icecast2/icecast.xml and change at least the passwords.
# Change this to true when done to enable the init.d script
ENABLE=false
-
diff --git a/debian/icecast2.init b/debian/icecast2.init
index f244804..84fecd9 100644
--- a/debian/icecast2.init
+++ b/debian/icecast2.init
@@ -5,13 +5,14 @@
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
-# Short-Description: Starts the icecast audio streaming server daemon
+# Short-Description: Icecast2 streaming media server
+# Description: Starts the icecast audio streaming server daemon
### END INIT INFO
#
# icecast2
#
# Written by Miquel van Smoorenburg <miquels at cistron.nl>.
-# Modified for Debian
+# Modified for Debian
# by Ian Murdock <imurdock at gnu.ai.mit.edu>.
#
# Further modified by Keegan Quinn <ice at thebasement.org>
@@ -21,7 +22,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/icecast2
NAME=icecast2
-DESC=icecast2
+DESC="streaming media server"
test -x $DAEMON || exit 0
@@ -46,28 +47,32 @@ set -e
case "$1" in
start)
- echo -n "Starting $DESC: "
+ log_daemon_msg "Starting $DESC" "$NAME"
start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
- --exec $DAEMON -- -b -c $CONFIGFILE
- echo "$NAME."
+ --exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
+ log_end_msg $?
;;
stop)
- echo -n "Stopping $DESC: "
+ log_daemon_msg "Stopping $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
- echo "$NAME."
+ log_end_msg $?
;;
reload|force-reload)
- echo "Reloading $DESC configuration files."
+ log_daemon_msg "Reloading $DESC configuration" "$NAME"
start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+ log_end_msg $?
;;
restart)
- echo -n "Restarting $DESC: "
+ 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
- echo "$NAME."
+ --exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
+ log_end_msg $?
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
*)
echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
--
icecast2 packaging
More information about the pkg-multimedia-commits
mailing list