]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 226812 via svnmerge from
authorTilghman Lesher <tilghman@meg.abyt.es>
Mon, 2 Nov 2009 17:17:03 +0000 (17:17 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Mon, 2 Nov 2009 17:17:03 +0000 (17:17 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

................
  r226812 | tilghman | 2009-11-02 11:15:31 -0600 (Mon, 02 Nov 2009) | 15 lines

  Merged revisions 226811 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.4

  ........
    r226811 | tilghman | 2009-11-02 11:14:20 -0600 (Mon, 02 Nov 2009) | 8 lines

    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
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@226814 65c4cc65-6c06-0410-ace0-fbb531ad65f3

contrib/init.d/rc.redhat.asterisk

index d2a630ea40ef7eade09a277d256246063388f2ee..f2ebc3674d4f7f5712a5066080edb871f9a49adb 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