diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-08-25 23:04:57 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-08-25 23:04:57 +0000 |
commit | e95848aef379e0ee97a299a270835e3fc0657e2d (patch) | |
tree | b7d153995c67fcc1be245216b83f47a036998539 /zaptel.init | |
parent | 37f8b22b148c8d91007c24aa8f5726c374a7b3b7 (diff) |
zaptel.init: Allow passing extra arguments (e.g.: -c conffig) to ztcfg.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2954 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.init')
-rw-r--r-- | zaptel.init | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/zaptel.init b/zaptel.init index 4bff1da..3dfbe4e 100644 --- a/zaptel.init +++ b/zaptel.init @@ -14,6 +14,8 @@ initdir=/etc/init.d # /etc/defualt/zaptel (depending on your system) instead. ZTCFG=/sbin/ztcfg +ZTCFG_CMD="$ZTCFG" # e.g: for a custom zaptel.conf location + # The default syncer Astribank. Usually set automatically to a sane # value by xpp_sync(1) if you have an Astribank. You can set this to an # explicit Astribank (e.g: 01). @@ -137,13 +139,13 @@ shutdown_dynamic() { if ! grep -q ' ZTD/' /proc/* 2>/dev/null; then return; fi # we should only get here if we have dynamic spans. Right? - $ZTCFG -s + $ZTCFG_CMD -s } # Check that telephony is up. [ "${TELEPHONY}" = "yes" ] || exit 0 -[ -f $ZTCFG ] || exit 0 +[ -x "$ZTCFG" ] || exit 0 [ -f /etc/zaptel.conf ] || exit 0 @@ -197,10 +199,10 @@ case "$1" in fi if [ $system = debian ]; then echo -n "Running ztcfg: " - $ZTCFG 2> /dev/null && echo -n "done" + $ZTCFG_CMD 2> /dev/null && echo -n "done" echo "." elif [ $system = redhat ]; then - action "Running ztcfg: " $ZTCFG + action "Running ztcfg: " $ZTCFG_CMD fi RETVAL=$? @@ -230,10 +232,10 @@ case "$1" in reload) if [ $system = debian ]; then echo -n "Reloading ztcfg: " - $ZTCFG 2> /dev/null && echo -n "done" + $ZTCFG_CMD 2> /dev/null && echo -n "done" echo "." elif [ $system = redhat ]; then - action "Reloading ztcfg: " $ZTCFG + action "Reloading ztcfg: " $ZTCFG_CMD fi RETVAL=$? ;; |