mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-15 17:27:02 +00:00
When starting Asterisk, bug out if Asterisk is already running.
(closes issue #12525) Reported by: explidous Patches: 20080428__bug12525.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@115285 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -63,6 +63,15 @@ RETVAL=0
|
||||
|
||||
start() {
|
||||
# Start daemons.
|
||||
|
||||
# Check if Asterisk is already running. If it is, then bug out, because
|
||||
# starting Asterisk when Asterisk is already running is very bad.
|
||||
VERSION=`/usr/sbin/asterisk -rx 'core show version'`
|
||||
if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t"
|
||||
echo "Asterisk is already running. $0 will exit now."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo -n $"Starting asterisk: "
|
||||
if [ -f $SAFE_ASTERISK ] ; then
|
||||
DAEMON=$SAFE_ASTERISK
|
||||
|
Reference in New Issue
Block a user