[svn-commits] tzafrir: branch 1.2 r1493 - /branches/1.2/xpp/utils/genzaptelconf

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Oct 2 21:41:24 MST 2006


Author: tzafrir
Date: Mon Oct  2 23:41:23 2006
New Revision: 1493

URL: http://svn.digium.com/view/zaptel?rev=1493&view=rev
Log:
Allow overriding the location of the asterisk init.d script 
using the variable ASTERISK_INIT_SCRIPT (from the config file or from
the environment).

Modified:
    branches/1.2/xpp/utils/genzaptelconf

Modified: branches/1.2/xpp/utils/genzaptelconf
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/genzaptelconf?rev=1493&r1=1492&r2=1493&view=diff
==============================================================================
--- branches/1.2/xpp/utils/genzaptelconf (original)
+++ branches/1.2/xpp/utils/genzaptelconf Mon Oct  2 23:41:23 2006
@@ -67,6 +67,7 @@
 # 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 @@
 # 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 @@
   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



More information about the svn-commits mailing list