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()
{
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
}
#
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"
}
# f_debug: gather memory & space information
+#
f_debug()
{
local mem_total=0 mem_free=0 mem_swap=0 tmp_space=0 backup_space=0