simple-adblock: update init file and config 20645/head
authorStan Grishin <stangri@melmac.ca>
Sat, 11 Mar 2023 10:43:48 +0000 (10:43 +0000)
committerStan Grishin <stangri@melmac.ca>
Sat, 11 Mar 2023 10:48:34 +0000 (10:48 +0000)
* move network.sh and jshn.sh includes into load_validate_config function
  to prevent errors when adding the package to image with the Image Builder
* add @bongochong compressed domains block-list to the config

Signed-off-by: Stan Grishin <stangri@melmac.ca>
net/simple-adblock/Makefile
net/simple-adblock/files/simple-adblock.conf
net/simple-adblock/files/simple-adblock.init

index bb4852502ea97ed8950162c6bb60f14b5112c795..15169eacb8945fa858ec15f2228acc8367833bdc 100644 (file)
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=simple-adblock
 PKG_VERSION:=1.9.4
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_MAINTAINER:=Stan Grishin <stangri@melmac.ca>
 PKG_LICENSE:=GPL-3.0-or-later
 
index 46518c6ee2078ca2a2de2414f6dcdc91b96b7f58..7949156aa7e3cb84930da73af34e1a70b2bd78a0 100644 (file)
@@ -64,6 +64,10 @@ config simple-adblock 'config'
 # block-list too big for most routers
 #      list blocked_hosts_url 'https://cdn.jsdelivr.net/gh/StevenBlack/hosts/hosts'
 
+# File size: 2.0M
+# block-list too big for most routers
+#      list blocked_domains_url https://cdn.jsdelivr.net/gh/bongochong/CombinedPrivacyBlockLists/NoFormatting/cpbl-ctld.txt
+
 # File size: 3.1M
 # block-list too big for most routers
 #      list blocked_hosts_url 'https://hostsfile.mine.nu/Hosts'
index 1522569abbc4f86f2e67502c3356ed32fc12c7a9..87fdfdef761d0fce4a3c799f0c564a3bb4efc946 100644 (file)
@@ -88,9 +88,6 @@ outputCache=
 awk='awk'
 load_environment_flag=
 
-. /lib/functions/network.sh
-. /usr/share/libubox/jshn.sh
-
 debug() { local i j; for i in "$@"; do eval "j=\$$i"; echo "${i}: ${j} "; done; }
 
 uci_add_list_if_new() {
@@ -1562,6 +1559,8 @@ stop_service() { load_validate_config 'config' adb_stop "'$*'"; }
 version() { echo "$PKG_VERSION"; }
 
 load_validate_config() {
+       . /lib/functions/network.sh
+       . /usr/share/libubox/jshn.sh
        local enabled
        local force_dns
        local force_dns_port