diff options
Diffstat (limited to 'applications/luci-app-dnscrypt-proxy/luasrc')
-rw-r--r-- | applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua | 12 | ||||
-rw-r--r-- | applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua | 4 |
2 files changed, 7 insertions, 9 deletions
diff --git a/applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua b/applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua index ca078f0cd3..c055945252 100644 --- a/applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua +++ b/applications/luci-app-dnscrypt-proxy/luasrc/controller/dnscrypt-proxy.lua @@ -1,4 +1,4 @@ --- Copyright 2017 Dirk Brenken (dev@brenken.org) +-- Copyright 2017-2019 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 module("luci.controller.dnscrypt-proxy", package.seeall) @@ -27,12 +27,10 @@ function view_reslist() end function logread() - local logfile - - if nixio.fs.access("/var/log/messages") then - logfile = util.trim(util.exec("cat /var/log/messages | grep 'dnscrypt-proxy'")) - else - logfile = util.trim(util.exec("logread -e 'dnscrypt-proxy'")) + local logfile = util.trim(util.exec("logread -e 'dnscrypt-proxy' 2>/dev/null")) or "" + + if logfile == "" then + logfile = "No DNSCrypt-Proxy related logs yet!" end templ.render("dnscrypt-proxy/logread", {title = i18n.translate("DNSCrypt-Proxy Logfile"), content = logfile}) end diff --git a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua index 8f0e3224b4..967110fbf8 100644 --- a/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua +++ b/applications/luci-app-dnscrypt-proxy/luasrc/model/cbi/dnscrypt-proxy/overview_tab.lua @@ -59,7 +59,7 @@ m = Map("dnscrypt-proxy", translate("DNSCrypt-Proxy"), translate("Configuration of the DNSCrypt-Proxy package. ") .. translatef("For further information " .. "<a href=\"%s\" target=\"_blank\">" - .. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt")) + .. "see the wiki online</a>", "https://openwrt.org/docs/guide-user/services/dns/dnscrypt")) m:chain("dhcp") function m.on_after_commit(self) @@ -146,7 +146,7 @@ if not fs.access("/etc/resolv-crypt.conf") or fs.stat("/etc/resolv-crypt.conf"). translate("Create '/etc/resolv-crypt.conf' with 'options timeout:1' to reduce DNS upstream timeouts with multiple DNSCrypt instances.<br />") .. translatef("For further information " .. "<a href=\"%s\" target=\"_blank\">" - .. "see the wiki online</a>", "https://wiki.openwrt.org/inbox/dnscrypt")) + .. "see the wiki online</a>", "https://openwrt.org/docs/guide-user/services/dns/dnscrypt")) btn2.inputtitle = translate("Create Config File") btn2.inputstyle = "apply" btn2.disabled = false |