diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-05 03:25:35 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-05-05 03:25:35 +0000 |
commit | ffb620f33d99660082aa32203c227606955b6c16 (patch) | |
tree | 2beb5b49356fe21b1a4ded5f0f6b9ca311287d5a /contrib/init.d/rc.redhat.asterisk | |
parent | a0331e1cf47381b2841361a5c57020012b874816 (diff) |
Merged revisions 115285 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r115285 | tilghman | 2008-05-04 22:22:25 -0500 (Sun, 04 May 2008) | 7 lines
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/trunk@115286 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 |