local json = require("luci.jsonc")
local adbinput = uci.get("adblock", "global", "adb_rtfile") or "/tmp/adb_runtime.json"
local dnspath = uci.get("adblock", "global", "adb_dnsdir") or ""
-local parse = json.parse(fs.readfile(adbinput))
+local parse = json.parse(fs.readfile(adbinput) or "")
if parse ~= nil then
version = parse.data.adblock_version
domains = parse.data.blocked_domains
dnspath = "/var/lib/unbound"
elseif backend == "named" then
dnspath = "/var/lib/bind"
+ elseif backend == "kresd" then
+ dnspath = "/tmp/kresd"
end
end
end
e2.default = e2.disabled
e2.rmempty = false
-e3 = e:option(Flag, "adb_manmode", translate("Manual mode"),
+e3 = e:option(Flag, "adb_manmode", translate("Manual / Backup mode"),
translate("Do not automatically update blocklists during startup, use blocklist backups instead."))
e3.default = e3.disabled
e3.rmempty = false