]> git.99rst.org Git - openwrt-packages.git/commitdiff
adblock: update 4.5.8-2
authorDirk Brenken <redacted>
Thu, 10 Sep 2026 18:32:44 +0000 (20:32 +0200)
committerDirk Brenken <redacted>
Thu, 10 Sep 2026 18:32:44 +0000 (20:32 +0200)
- refine the reload trigger call logic

Signed-off-by: Dirk Brenken <redacted>
net/adblock/Makefile
net/adblock/README.md
net/adblock/files/adblock.init

index da26496d51553160608fbbe4caf545d4a9c266bb..2056df3c0418eabc2a32df1e46b117f1ef08ad5c 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.5.8
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index 871b859376284ba52407c65ba7614ce51801d0e4..de90130622b2743b5c226b08e59347f3f84ebf20 100644 (file)
@@ -141,7 +141,7 @@ Support of the following fully pre-configured domain blocklist feeds (free for p
 * Install the LuCI companion package `luci-app-adblock` which also installs the main `adblock` package as a dependency
 * Enable the adblock system service (System -> Startup) and enable adblock itself (adblock -> General Settings)
 * It's strongly recommended to use the LuCI frontend to easily configure all aspects of adblock, the application is located in LuCI under the `Services` menu
-* It's also recommended to configure a `Startup Trigger Interface` to depend on your WAN interface events during boot or restart of your router. Listing IPv6 interfaces (wan6) is fine as well: a trigger only starts a run if the last one did not succeed, so the chatty netifd update events no longer cause repeated downloads
+* It's also recommended to configure a `Startup Trigger Interface` to depend on your WAN interface events during boot or restart of your router. Listing IPv6 interfaces (wan6) is fine as well: a trigger only starts a run if the last one did not succeed or if its blocklist is gone, so the chatty netifd update events no longer cause repeated downloads
 
 <a id="adblock-cli-interface"></a>
 ## Adblock CLI interface
index 6810629eb45c83b75729252c47236914f8bba569..93869155763109ddc71c142b69d62ab9dd76f81c 100755 (executable)
@@ -55,7 +55,7 @@ boot() {
 }
 
 start_service() {
-       local status
+       local status backend blocklist
 
        if "${adb_init}" enabled; then
                if [ "${action}" = "boot" ]; then
@@ -65,7 +65,13 @@ start_service() {
                        json_init
                        json_load_file "${adb_rtfile}" >/dev/null 2>&1
                        json_get_var status "adblock_status"
-                       [ -n "${status}" ] && [ "${status}" != "error" ] && return 0
+                       json_get_var backend "dns_backend"
+                       if [ -n "${status}" ] && [ "${status}" != "error" ]; then
+                               [ "${status}" != "enabled" ] && return 0
+                               blocklist="${backend#*, }"
+                               blocklist="${blocklist%%,*}/adb_list.overall"
+                               [ -s "${blocklist}" ] && return 0
+                       fi
                fi
 
                procd_open_instance "adblock"
git clone https://git.99rst.org/PROJECT