Merge pull request #16898 from stangri/master-simple-adblock
simple-adblock: update to 1.8.8-1
This commit is contained in:
commit
c2f58c7c49
2 changed files with 23 additions and 18 deletions
|
@ -5,8 +5,8 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=simple-adblock
|
PKG_NAME:=simple-adblock
|
||||||
PKG_VERSION:=1.8.7
|
PKG_VERSION:=1.8.8
|
||||||
PKG_RELEASE:=8
|
PKG_RELEASE:=1
|
||||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.net>
|
||||||
PKG_LICENSE:=GPL-3.0-or-later
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
|
||||||
|
|
|
@ -1084,16 +1084,20 @@ check() {
|
||||||
load_package_config
|
load_package_config
|
||||||
local c string="$1"
|
local c string="$1"
|
||||||
c="$(grep -c "$string" "$outputFile")"
|
c="$(grep -c "$string" "$outputFile")"
|
||||||
|
c="${c:-0}"
|
||||||
if [ ! -s "$outputFile" ]; then
|
if [ ! -s "$outputFile" ]; then
|
||||||
echo "No block-list ('$outputFile') found."
|
echo "No block-list ('$outputFile') found."
|
||||||
elif [ -z "$string" ]; then
|
elif [ -z "$string" ]; then
|
||||||
echo "Usage: /etc/init.d/${packageName} check string"
|
echo "Usage: /etc/init.d/${packageName} check string"
|
||||||
elif [ "$c" -gt 0 ]; then
|
elif [ "$c" -gt 0 ]; then
|
||||||
if [ "$c" -gt 1 ]; then
|
if [ "$c" -eq 1 ]; then
|
||||||
|
echo "Found 1 match for '$string' in '$outputFile':"
|
||||||
|
elif [ "$c" -le 20 ]; then
|
||||||
echo "Found $c matches for '$string' in '$outputFile':"
|
echo "Found $c matches for '$string' in '$outputFile':"
|
||||||
else
|
else
|
||||||
echo "Found 1 match for '$string' in '$outputFile':"
|
echo "Found $c matches for '$string' in '$outputFile'."
|
||||||
fi
|
fi
|
||||||
|
if [ "$c" -le 20 ]; then
|
||||||
case "$targetDNS" in
|
case "$targetDNS" in
|
||||||
dnsmasq.addnhosts)
|
dnsmasq.addnhosts)
|
||||||
grep "$string" "$outputFile" | sed 's|^127.0.0.1 ||;s|^:: ||;';;
|
grep "$string" "$outputFile" | sed 's|^127.0.0.1 ||;s|^:: ||;';;
|
||||||
|
@ -1106,8 +1110,9 @@ check() {
|
||||||
unbound.adb_list)
|
unbound.adb_list)
|
||||||
grep "$string" "$outputFile" | sed 's|^local-zone: "||;s|" static$||;';;
|
grep "$string" "$outputFile" | sed 's|^local-zone: "||;s|" static$||;';;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "The $string is not found in current block-list ('$outputFile')."
|
echo "The '$string' is not found in current block-list ('$outputFile')."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue