adblock: update 1.3.2 2918/head
authorDirk Brenken <dev@brenken.org>
Sun, 3 Jul 2016 05:42:19 +0000 (07:42 +0200)
committerDirk Brenken <dev@brenken.org>
Sun, 3 Jul 2016 05:42:19 +0000 (07:42 +0200)
* only a few more fixes

Signed-off-by: Dirk Brenken <dev@brenken.org>
Euro 16: germany vs. italy 6:5 (after 18 penalties) :-)

net/adblock/Makefile
net/adblock/files/adblock-helper.sh
net/adblock/files/adblock-update.sh

index dd4e69a1782e1414618cab929b10773e3cf70a55..78f16acc3fe5f13a02e294ca00ac30af6a37e7a3 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
-PKG_VERSION:=1.3.1
+PKG_VERSION:=1.3.2
 PKG_RELEASE:=1
 PKG_LICENSE:=GPL-3.0+
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
index ca8dafe1145ff08a50ee3de2c6b639b18cf6ce89..4aa6b2be37546a7d8829cfb94ed2471357a9b0ac 100644 (file)
@@ -422,25 +422,21 @@ f_envcheck()
 
     # check volatile uhttpd instance configuration
     #
-    check="$(pgrep -f "uhttpd -h /www/adblock")"
-    if [ -z "${check}" ]
+    if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
     then
-        if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
-        then
-            f_uhttpd "adbIPv4+6_80" "1" "-p ${adb_ipv4}:${adb_nullport} -p [${adb_ipv6}]:${adb_nullport}"
-            f_uhttpd "adbIPv4+6_443" "0" "-p ${adb_ipv4}:${adb_nullportssl} -p [${adb_ipv6}]:${adb_nullportssl}"
-        elif [ -n "${adb_wanif4}" ]
-        then
-            f_uhttpd "adbIPv4_80" "1" "-p ${adb_ipv4}:${adb_nullport}"
-            f_uhttpd "adbIPv4_443" "0" "-p ${adb_ipv4}:${adb_nullportssl}"
-        else
-            f_uhttpd "adbIPv6_80" "1" "-p [${adb_ipv6}]:${adb_nullport}"
-            f_uhttpd "adbIPv6_443" "0" "-p [${adb_ipv6}]:${adb_nullportssl}"
-        fi
-        if [ "${uhttpd_ok}" = "true" ]
-        then
-            f_log "created volatile uhttpd instances"
-        fi
+        f_uhttpd "adbIPv4+6_80" "1" "-p ${adb_ipv4}:${adb_nullport} -p [${adb_ipv6}]:${adb_nullport}"
+        f_uhttpd "adbIPv4+6_443" "0" "-p ${adb_ipv4}:${adb_nullportssl} -p [${adb_ipv6}]:${adb_nullportssl}"
+    elif [ -n "${adb_wanif4}" ]
+    then
+        f_uhttpd "adbIPv4_80" "1" "-p ${adb_ipv4}:${adb_nullport}"
+        f_uhttpd "adbIPv4_443" "0" "-p ${adb_ipv4}:${adb_nullportssl}"
+    else
+        f_uhttpd "adbIPv6_80" "1" "-p [${adb_ipv6}]:${adb_nullport}"
+        f_uhttpd "adbIPv6_443" "0" "-p [${adb_ipv6}]:${adb_nullportssl}"
+    fi
+    if [ "${uhttpd_ok}" = "true" ]
+    then
+        f_log "created volatile uhttpd instances"
     fi
 
     # check whitelist entries
@@ -471,7 +467,6 @@ f_depend()
     elif [ -z "${check}" ]
     then
         rc=-1
-        package_ok="false"
         f_log "package '${package}' not found"
         f_exit
     fi
@@ -490,7 +485,6 @@ f_firewall()
     local chpos="${5}"
     local notes="adb-${6}"
     local rules="${7}"
-    firewall_ok="true"
 
     # select appropriate iptables executable for IPv6
     #
@@ -528,9 +522,10 @@ f_firewall()
     then
         "${ipt}" -w -t "${table}" -I "${chain}" "${chpos}" -m comment --comment "${notes}" ${rules}
         rc=${?}
-        if [ $((rc)) -ne 0 ]
+        if [ $((rc)) -eq 0 ]
         then
-            firewall_ok="false"
+            firewall_ok="true"
+        else
             f_log "failed to initialize volatile ${proto} firewall rule '${notes}'"
             f_exit
         fi
@@ -541,18 +536,23 @@ f_firewall()
 #
 f_uhttpd()
 {
+    local check
     local realm="${1}"
     local timeout="${2}"
     local ports="${3}"
-    uhttpd_ok="true"
 
-    uhttpd -h "/www/adblock" -N 25 -T "${timeout}" -r "${realm}" -k 0 -t 0 -R -D -S -E "/index.html" ${ports}
-    rc=${?}
-    if [ $((rc)) -ne 0 ]
+    check="$(pgrep -f "uhttpd -h /www/adblock -N 25 -T ${timeout} -r ${realm}")"
+    if [ -z "${check}" ]
     then
-        uhttpd_ok="false"
-        f_log "failed to initialize volatile uhttpd instance (${realm})"
-        f_exit
+        uhttpd -h "/www/adblock" -N 25 -T "${timeout}" -r "${realm}" -k 0 -t 0 -R -D -S -E "/index.html" ${ports}
+        rc=${?}
+        if [ $((rc)) -eq 0 ]
+        then
+            uhttpd_ok="true"
+        else
+            f_log "failed to initialize volatile uhttpd instance (${realm})"
+            f_exit
+        fi
     fi
 }
 
@@ -570,8 +570,6 @@ f_space()
         then
             space_ok="false"
         fi
-    else
-        space_ok="false"
     fi
 }
 
index f401301d614b6892b9265398a02bfed4547020ff..caf87afbb61cdeb22f87a83f22b3af356bc200ce 100755 (executable)
@@ -10,7 +10,7 @@
 #
 adb_pid="${$}"
 adb_pidfile="/var/run/adblock.pid"
-adb_scriptver="1.3.1"
+adb_scriptver="1.3.2"
 adb_mincfgver="2.2"
 adb_scriptdir="${0%/*}"
 if [ -r "${adb_pidfile}" ]