adblock: bugfix 2.1.2

* fix minor build error in init script

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2017-01-20 09:57:33 +01:00
parent 43971e29a1
commit d960507c5f
3 changed files with 9 additions and 9 deletions

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=adblock
PKG_VERSION:=2.1.1
PKG_VERSION:=2.1.2
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>

View File

@ -9,9 +9,7 @@ EXTRA_HELP=" suspend Suspend adblock processing
resume Resume adblock processing
query <DOMAIN> Query active blocklists for specific domain"
exec 2>/dev/null
adb_script="/usr/bin/adblock.sh"
adb_iface="$(uci -q get adblock.global.adb_iface)"
boot()
{
@ -74,16 +72,17 @@ query()
service_triggers()
{
local iface
local iface="$(uci -q get adblock.global.adb_iface)"
procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
if [ -z "${adb_iface}" ]
if [ -z "${iface}" ]
then
procd_add_raw_trigger "interface.*.up" 1000 /etc/init.d/adblock start
else
for iface in ${adb_iface}
for name in ${iface}
do
procd_add_interface_trigger "interface.*.up" "${iface}" /etc/init.d/adblock start
procd_add_interface_trigger "interface.*.up" "${name}" /etc/init.d/adblock start
done
fi
procd_add_config_trigger "config.change" "adblock" /etc/init.d/adblock start
}

View File

@ -10,7 +10,7 @@
#
LC_ALL=C
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
adb_ver="2.1.1"
adb_ver="2.1.2"
adb_enabled=1
adb_debug=0
adb_whitelist="/etc/adblock/adblock.whitelist"
@ -295,6 +295,7 @@ f_log()
}
# f_debug: gather memory & space information
#
f_debug()
{
local mem_total=0 mem_free=0 mem_swap=0 tmp_space=0 backup_space=0