MT#13821 add default file support to use RUN_DAEMON

Change-Id: Ib0526cc5e8edb9fbfa8ebe7dc24015c96d70bd64
(cherry picked from commit 639a17d21e)
mr3.8.3
Victor Seva 10 years ago
parent 8ca997ba99
commit 21364bf2ea

@ -0,0 +1 @@
RUN_DAEMON=no

@ -15,7 +15,7 @@
# - Added test for safe_asterisk
# - Changed "stop gracefully" to "stop now"
# - Added support for -U and -G command line options
# - Modified "reload" to call asterisk -rx 'reload'
# - Modified "reload" to call asterisk -rx 'reload'
### BEGIN INIT INFO
@ -37,7 +37,7 @@ DESC="Asterisk PBX"
# Full path to asterisk binary
DAEMON=/usr/sbin/asterisk
TRUE=/bin/true
DEFAULTS=/etc/default/$NAME
# Uncomment this ONLY if you know what you are doing.
# export LD_ASSUME_KERNEL=2.4.1
@ -49,6 +49,9 @@ TRUE=/bin/true
#AST_USER="asterisk"
#AST_GROUP="asterisk"
# do not start by default
RUN_DAEMON=no
set -e
if ! [ -x $DAEMON ] ; then
@ -61,6 +64,16 @@ if ! [ -d /etc/asterisk ] ; then
exit 0
fi
# Load startup options if available
if [ -f $DEFAULTS ]; then
. $DEFAULTS || true
fi
if [ "$RUN_DAEMON" != "yes" ]; then
echo "$DESC not yet configured. Edit $DEFAULTS first."
exit 0
fi
# Use the LSB standar functions for services management
. /lib/lsb/init-functions

Loading…
Cancel
Save