[SCM] icecast2/master: Changed init script to create pid file by default.

pere at users.alioth.debian.org pere at users.alioth.debian.org
Fri Jul 21 09:36:35 UTC 2017


The following commit has been merged in the master branch:
commit 76a358e0075a74d51b6c951a673fbb685b4622c1
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Fri Jul 21 09:27:30 2017 +0000

    Changed init script to create pid file by default.
    
    Closes: #585029

diff --git a/debian/icecast2.init b/debian/icecast2.init
index 84fc2db..a51abcb 100644
--- a/debian/icecast2.init
+++ b/debian/icecast2.init
@@ -34,6 +34,7 @@ CONFIGDEFAULTFILE="/etc/default/icecast2"
 USERID=icecast2
 GROUPID=icecast
 ENABLE="false"
+PIDFILE=/var/run/icecast2.pid
 
 # Reads config file (will override defaults above)
 [ -r "$CONFIGDEFAULTFILE" ] && . $CONFIGDEFAULTFILE
@@ -48,7 +49,7 @@ case "$1" in
 	if [ "$ENABLE" != "true" ];then
 		cancel
 	else
-		start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
+		start-stop-daemon --pidfile "$PIDFILE" --start --quiet --chuid $USERID:$GROUPID \
 			--exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
 	fi
 	log_end_msg $?
@@ -56,7 +57,7 @@ case "$1" in
   stop)
 	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
+	start-stop-daemon --pidfile "$PIDFILE" --stop --oknodo --retry TERM/5/0/30 --quiet --exec $DAEMON
 	log_end_msg $?
 	;;
   reload|force-reload)
@@ -64,7 +65,7 @@ case "$1" in
 	if [ "$ENABLE" != "true" ];then
 		cancel
 	else
-		start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
+		start-stop-daemon --pidfile "$PIDFILE" --stop --signal 1 --quiet --exec $DAEMON
 	fi
 	log_end_msg $?
 	;;
@@ -74,14 +75,14 @@ case "$1" in
 		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 \
+		start-stop-daemon --pidfile "$PIDFILE" --stop --oknodo --retry TERM/5/0/30 --quiet --exec $DAEMON
+		start-stop-daemon --pidfile "$PIDFILE" --start --quiet --chuid $USERID:$GROUPID \
 			--exec $DAEMON -- -b -c $CONFIGFILE > /dev/null
 	fi
 	log_end_msg $?
 	;;
   status)
-	status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+	status_of_proc -p "$PIDFILE" "$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