* 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
}
start_service() {
- local status
+ local status backend blocklist
if "${adb_init}" enabled; then
if [ "${action}" = "boot" ]; then
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"