diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-05 03:22:25 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-05 03:22:25 +0000 |
commit | 8c81e75f01dba357cc365e5fa4ff609d0d9e4b85 (patch) | |
tree | 1a58861d17c0c67338df468dd0866d7c0cf51fc0 /contrib/init.d/rc.redhat.asterisk | |
parent | 8e65ea9bd92da2a7ae784128210bb3d6b3535038 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@115285 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'contrib/init.d/rc.redhat.asterisk')
-rwxr-xr-x | contrib/init.d/rc.redhat.asterisk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/init.d/rc.redhat.asterisk b/contrib/init.d/rc.redhat.asterisk index 27d633e70..de821fe8a 100755 --- a/contrib/init.d/rc.redhat.asterisk +++ b/contrib/init.d/rc.redhat.asterisk @@ -68,6 +68,14 @@ fi RETVAL=0 start() { + # Check if Asterisk is already running. If it is, then bug out, because + # starting safe_asterisk when Asterisk is running is very bad. + VERSION=`${AST_SBIN}/asterisk -rx 'core show version'` + if [ "${VERSION:0:8}" = "Asterisk" ]; then # otherwise "Unable t" + echo "Asterisk is already running." + exit 1 + fi + # Start daemons. echo -n $"Starting asterisk: " if [ -f $SAFE_ASTERISK ] ; then |