[asterisk-commits] tilghman: branch 1.4 r226811 - /branches/1.4/contrib/init.d/rc.redhat.asterisk

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Nov 2 11:14:25 CST 2009


Author: tilghman
Date: Mon Nov  2 11:14:20 2009
New Revision: 226811

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=226811
Log:
Don't allow two separate instances of safe_asterisk when restarting from the init script.
(closes issue #14562)
 Reported by: davidw
 Patches: 
       Initially 20091022__issue14562.diff.txt uploaded by tilghman (license 14)
       Modified to 20091030__Issue14562_diff.txt uploaded by davidw (license 780)
 Tested by: davidw

Modified:
    branches/1.4/contrib/init.d/rc.redhat.asterisk

Modified: branches/1.4/contrib/init.d/rc.redhat.asterisk
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/contrib/init.d/rc.redhat.asterisk?view=diff&rev=226811&r1=226810&r2=226811
==============================================================================
--- branches/1.4/contrib/init.d/rc.redhat.asterisk (original)
+++ branches/1.4/contrib/init.d/rc.redhat.asterisk Mon Nov  2 11:14:20 2009
@@ -99,8 +99,14 @@
 
 stop() {
 	# Stop daemons.
+	if [ -f $SAFE_ASTERISK ]; then
+		# Kill safe_asterisk first, to prevent us from starting up 2 instances of safe_asterisk
+		echo -n $"Stopping safe_asterisk: "
+		killproc `basename $SAFE_ASTERISK`
+		echo
+	fi
 	echo -n $"Shutting down asterisk: "
-	killproc asterisk
+	killproc `basename $DAEMON`
 	RETVAL=$?
 	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/asterisk
 	echo




More information about the asterisk-commits mailing list