Merge pull request #1235 from aa65535/luci-base
[project/luci.git] / applications / luci-app-adblock / luasrc / model / cbi / adblock / overview_tab.lua
index 6d01e13..aa57014 100644 (file)
@@ -7,7 +7,7 @@ local sys = require("luci.sys")
 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
@@ -21,6 +21,8 @@ if parse ~= nil then
                        dnspath = "/var/lib/unbound"
                elseif backend == "named" then
                        dnspath = "/var/lib/bind"
+               elseif backend == "kresd" then
+                       dnspath = "/tmp/kresd"
                end
        end
 end
@@ -180,7 +182,7 @@ e2 = e:option(Flag, "adb_forcesrt", translate("Force Overall Sort"),
 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