adblock: update 1.1.16

* new config option 'adb_restricted' to disable updates of the adblock
config during runtime (no flash writes, disabled by default)
* new update function, to apply latest configuration changes if needed
(/etc/init.d/adblock cfgup)
* fix dns redirect rule
* various optimizations

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken
2016-06-03 15:21:55 +02:00
parent 4f3f239ff2
commit 41b05a5532
6 changed files with 119 additions and 80 deletions
+5 -7
View File
@@ -10,11 +10,9 @@
#
LC_ALL=C
# script debug switch (disabled by default)
# set 'DEBUG=1' to enable script debugging
# quiet output if 'adb_debug' not set
#
DEBUG=0
if [ $((DEBUG)) -eq 0 ]
if [ -z "${adb_debug}" ]
then
exec 2>/dev/null
fi
@@ -37,7 +35,7 @@ fi
# get current directory and set script/config version
#
adb_scriptdir="${0%/*}"
adb_scriptver="1.1.15"
adb_scriptver="1.1.16"
adb_mincfgver="2.0"
# source in adblock function library
@@ -303,8 +301,8 @@ then
"${adb_uci}" -q set "adblock.global.adb_dnstoggle=on"
/etc/init.d/dnsmasq restart
sleep 1
rc="$(ps | grep -q "[d]nsmasq"; printf ${?})"
if [ $((rc)) -eq 0 ]
check="$(ps | pgrep -f "dnsmasq")"
if [ -n "${check}" ]
then
f_log "adblock lists with overall ${adb_count} domains loaded"
else