Merged revisions 226811 via svnmerge from
[asterisk/asterisk.git] / contrib / init.d / rc.redhat.asterisk
index f45f8d7..5391c7b 100755 (executable)
@@ -99,8 +99,14 @@ start() {
 
 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