summaryrefslogtreecommitdiff
path: root/xpp/utils/genzaptelconf
diff options
context:
space:
mode:
Diffstat (limited to 'xpp/utils/genzaptelconf')
-rwxr-xr-xxpp/utils/genzaptelconf13
1 files changed, 10 insertions, 3 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index 47ef409..8cbf3ed 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -104,6 +104,13 @@ ZAPBRI_SIGNALLING=bri_ptmp
#ZAPBRI_SIGNALLING=pri
zapconf_def_termtype=te
+# A command to stop / start asterisk. Must support parameters "start"
+# and "stop" . This is the executable:
+ZAPCONF_ASTERISK_SCRIPT=/etc/init.d/asterisk
+#
+# Should you need to pass extra arguments:
+ZAPCONF_ASTERISK_CMD=$ZAPCONF_ASTERISK_SCRIPT
+
# read default configuration from /etc/default/zaptel
if [ -r $ZAPTEL_BOOT_DEBIAN ]; then . $ZAPTEL_BOOT_DEBIAN; fi
if [ -r $ZAPTEL_BOOT_FEDORA ]; then . $ZAPTEL_BOOT_FEDORA; fi
@@ -1110,7 +1117,7 @@ defaultzone=$loadzone
# make sure asterisk is not in our way
if [ "$force_stop_ast" = 'yes' ]
then
- /etc/init.d/asterisk stop 1>&2
+ $ZAPCONF_ASTERISK_CMD stop 1>&2
else
# if asterisk is running and we wanted to detect modules
# or simply to unload modules, asterisk needs to go away.
@@ -1166,9 +1173,9 @@ then
exit_cleanup 0
fi
-if [ -x /etc/init.d/asterisk ]
+if [ -x "$ZAPCONF_ASTERISK_SCRIPT" ]
then
- /etc/init.d/asterisk start 1>&2
+ $ZAPCONF_ASTERISK_CMD start 1>&2
fi
# if in verbose mode: verify that asterisk is running