Merged revisions 115554 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 8 May 2008 15:32:48 +0000 (15:32 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 8 May 2008 15:32:48 +0000 (15:32 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115554 | russell | 2008-05-08 10:32:08 -0500 (Thu, 08 May 2008) | 3 lines

Don't exit the script if Asterisk is not running.
(closes issue #12611)

........

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

contrib/init.d/rc.debian.asterisk

index 6a556f2..0d9eb69 100755 (executable)
@@ -22,6 +22,7 @@ NAME=asterisk
 DESC="Asterisk PBX"
 # Full path to asterisk binary
 DAEMON=/usr/sbin/asterisk
+TRUE=/bin/true
 
 # Uncomment this ONLY if you know what you are doing.
 # export LD_ASSUME_KERNEL=2.4.1
@@ -53,7 +54,7 @@ case "$1" in
   start)
        # Check if Asterisk is already running.  If it is, then bug out, because
        # starting up Asterisk when Asterisk is already running is very bad.
-       VERSION=`${DAEMON} -rx 'core show version'`
+       VERSION=`${DAEMON} -rx 'core show version' || ${TRUE}`
        if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
                echo "Asterisk is already running.  $0 will exit now."
                exit 1