adblock-fast: bugfix: detect_file_type()
* Properly detect domain lists, fixes https://github.com/openwrt/packages/issues/25973 Thanks @timfeierabend * Better output when setting triggers * No wait for ubus network.interface on boot Signed-off-by: Stan Grishin <stangri@melmac.ca>
This commit is contained in:
parent
d5cd6f3cf2
commit
f19bf22b3c
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=adblock-fast
|
||||
PKG_VERSION:=1.1.3
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=5
|
||||
PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
|
||||
PKG_LICENSE:=AGPL-3.0-or-later
|
||||
|
||||
|
|
|
@ -638,7 +638,7 @@ detect_file_type() {
|
|||
echo 'dnsmasq2'
|
||||
elif grep -q '^address=' "$file"; then
|
||||
echo 'dnsmasq3'
|
||||
elif grep -q '^0\.0\.0\.0' "$file" || grep -q '^127\.0\.0\.1' "$file"; then
|
||||
elif grep -q -e '^0\.0\.0\.0\s' -e '^127\.0\.0\.1\s' "$file"; then
|
||||
echo 'hosts'
|
||||
elif [ -n "$(sed "$domainsFilter" "$file" | head -1)" ]; then
|
||||
echo 'domains'
|
||||
|
@ -2258,7 +2258,7 @@ adb_pause() {
|
|||
|
||||
allow() { load_validate_config 'config' adb_allow "'$*'"; }
|
||||
boot() {
|
||||
ubus -t 30 wait_for network.interface 2>/dev/null
|
||||
# ubus -t 30 wait_for network.interface 2>/dev/null
|
||||
adbf_boot_flag=1
|
||||
rc_procd start_service 'on_boot' && service_started 'on_boot'
|
||||
}
|
||||
|
@ -2311,7 +2311,7 @@ service_triggers() {
|
|||
wan6="${wan6:-wan6}"
|
||||
fi
|
||||
output "Setting trigger${wan6:+s} for $wan ${wan6:+$wan6 }"
|
||||
for i in "$wan" "$wan6"; do
|
||||
for i in $wan $wan6; do
|
||||
procd_add_interface_trigger "interface.*" "$i" "/etc/init.d/${packageName}" start && output_ok || output_fail
|
||||
done
|
||||
output '\n'
|
||||
|
|
Loading…
Reference in New Issue