mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
adblock: update 1.2.1
* small optimizations & cosmetics Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
@@ -2,12 +2,11 @@
|
||||
#
|
||||
|
||||
START=99
|
||||
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
EXTRA_COMMANDS="toggle cfgup"
|
||||
EXTRA_HELP=" toggle Toggle adblocking 'on' or 'off'
|
||||
cfgup Update the adblock configuration file"
|
||||
|
||||
PATH="/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
|
||||
adb_debug=0
|
||||
if [ $((adb_debug)) -eq 0 ]
|
||||
then
|
||||
@@ -74,7 +73,7 @@ reload()
|
||||
stop()
|
||||
{
|
||||
cfg_check="$(${adb_uci} -q get "adblock.global.adb_overall_count")"
|
||||
if [ -n "${cfg_check}" ]
|
||||
if [ -n "${cfg_check}" ] && [ -z "${restart}" ]
|
||||
then
|
||||
. "/lib/functions.sh"
|
||||
config_load adblock
|
||||
@@ -83,12 +82,9 @@ stop()
|
||||
"${adb_uci}" -q delete "adblock.global.adb_overall_count"
|
||||
"${adb_uci}" -q delete "adblock.global.adb_percentage"
|
||||
"${adb_uci}" -q delete "adblock.global.adb_lastrun"
|
||||
if [ -z "${restart}" ]
|
||||
then
|
||||
"${adb_uci}" -q commit "adblock"
|
||||
fi
|
||||
"${adb_uci}" -q commit "adblock"
|
||||
fi
|
||||
fw_check="$(iptables -w -t nat -nL | grep -F "adb-")"
|
||||
fw_check="$(iptables -w -vnL | grep -Fo "adb-")"
|
||||
if [ -n "${fw_check}" ] && [ -z "${restart}" ]
|
||||
then
|
||||
iptables-save -t nat | grep -Fv -- "adb-" | iptables-restore
|
||||
|
||||
Reference in New Issue
Block a user