diff options
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=$? ;; |