summaryrefslogtreecommitdiff
path: root/zaptel.init
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-16 13:14:05 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-07-16 13:14:05 +0000
commit4bcb48810326e73ef05cb07b7c4273439064eb4f (patch)
treedbaafdd27534ffbfbb8e4a23e19aeeefd93fee3b /zaptel.init
parent19e3ffa8c89deac7a5cb3818ef7b5dc8051d412b (diff)
Simplify hpec_start and remove duplicates.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2740 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'zaptel.init')
-rw-r--r--zaptel.init18
1 files changed, 3 insertions, 15 deletions
diff --git a/zaptel.init b/zaptel.init
index 3bdb2ca..a0e5380 100644
--- a/zaptel.init
+++ b/zaptel.init
@@ -85,15 +85,10 @@ xpp_startup() {
hpec_start() {
- # 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 [ -z "${haveHPEC}" ]; then return; fi
+ if ! echo /var/lib/digium/licenses/HPEC-*.lic | grep -v '\*' | grep -q .; then
+ return
+ fi
# zaphpec_enable not installed in /usr/sbin
if [ ! -f /usr/sbin/zaphpec_enable ]; then
@@ -200,13 +195,6 @@ 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_start
;;