diff options
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 |