summaryrefslogtreecommitdiff
path: root/xpp/utils
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-10-03 04:41:23 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-10-03 04:41:23 +0000
commitc2a6e32b85c2eafbf2f740ac2aa050b147e6f4cc (patch)
tree1155e8f46b80bedb783803f7800c14aaf8eaeb1d /xpp/utils
parent0bcdf46386619a7820982fdd96d82d4ffc2f6119 (diff)
Allow overriding the location of the asterisk init.d script
using the variable ASTERISK_INIT_SCRIPT (from the config file or from the environment). git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1493 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils')
-rwxr-xr-xxpp/utils/genzaptelconf7
1 files changed, 4 insertions, 3 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index d69b710..048f710 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -67,6 +67,7 @@ exten_defs_file=/etc/asterisk/extensions-defs.conf
# how long to wait for /dev/zap/ctl to appear? (seconds)
DEVZAP_TIMEOUT=${DEVZAP_TIMEOUT:-20}
ZTCFG=${ZTCFG:-/sbin/ztcfg}
+ASTERISK_INIT_SCRIPT=${ASTERISK_INIT_SCRIPT:-/etc/init.d/asterisk}
# a temporary directory. Created when the switch -r is parsed on getopts
# and deleted in the end on update_extensions_defs
@@ -866,7 +867,7 @@ defaultzone=$loadzone
# make sure asterisk is not in our way
if [ "$force_stop_ast" = 'yes' ]
then
- /etc/init.d/asterisk stop 1>&2
+ $ASTERISK_INIT_SCRIPT stop 1>&2
else
# if asterisk is running and we wanted to detect modules
# or simply to unload modules, asterisk needs to go away.
@@ -919,9 +920,9 @@ then
exit 0
fi
-if [ -x /etc/init.d/asterisk ]
+if [ -x $ASTERISK_INIT_SCRIPT ]
then
- /etc/init.d/asterisk start 1>&2
+ $ASTERISK_INIT_SCRIPT start 1>&2
fi
# if in verbose mode: verify that asterisk is running