summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zaptel.init40
1 files changed, 40 insertions, 0 deletions
diff --git a/zaptel.init b/zaptel.init
index f867284..547e816 100644
--- a/zaptel.init
+++ b/zaptel.init
@@ -200,6 +200,46 @@ case "$1" in
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $LOCKFILE
+
+ # check for HPEC licenses
+ for f in /var/lib/digium/licenses/HPEC*.lic; do
+ if [ -f ${f} ]; then
+ haveHPEC = 1
+ fi
+ done
+
+ # HPEC license found
+ if [ -n "${haveHPEC}" ]; then
+ # zaphpec_enable not installed in /usr/sbin
+ if [ ! -f /usr/sbin/zaphpec_enable ]; then
+ echo -n "Running zaphpec_enable: Failed"
+ echo -n "."
+ echo " The zaphpec_enable binary is not installed in /usr/sbin."
+ else
+ # zaphpec_enable not set executable
+ if [ ! -x /usr/sbin/zaphpec_enable ]; then
+ echo -n "Running zaphpec_enable: Failed"
+ echo -n "."
+ echo " /usr/sbin/zaphpec_enable is not set as executable."
+ else
+ # zaphpec_enable properly installed
+ if [ $system = debian ]; then
+ echo -n "Running zaphpec_enable: "
+ /usr/sbin/zaphpec_enable >& /dev/null
+ elif [ $system = redhat ]; then
+ action "Running zaphpec_enable: " /usr/sbin/zaphpec_enable
+ fi
+ if [ $? = 0 ]; then
+ echo -n "done"
+ echo "."
+ else
+ echo -n "Failed"
+ echo -n "."
+ echo " This can be caused if you had already run zaphpec_enable, or if your HPEC license is no longer valid."
+ fi
+ fi
+ fi
+ fi
;;
stop)
# Unload drivers