luci-app-DNSCrypt-Proxy: small controller changes

- remove needless Turris Omnia logread workaround, due to changes in
latest syslog-ng package

Signed-off-by: Dirk Brenken <dev@brenken.org>
This commit is contained in:
Dirk Brenken 2019-02-02 09:04:33 +01:00
parent 68d3351d36
commit c6e3d05435

View file

@ -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 -- This is free software, licensed under the Apache License, Version 2.0
module("luci.controller.dnscrypt-proxy", package.seeall) module("luci.controller.dnscrypt-proxy", package.seeall)
@ -27,12 +27,10 @@ function view_reslist()
end end
function logread() function logread()
local logfile local logfile = util.trim(util.exec("logread -e 'dnscrypt-proxy' 2>/dev/null")) or ""
if nixio.fs.access("/var/log/messages") then if logfile == "" then
logfile = util.trim(util.exec("cat /var/log/messages | grep 'dnscrypt-proxy'")) logfile = "No DNSCrypt-Proxy related logs yet!"
else
logfile = util.trim(util.exec("logread -e 'dnscrypt-proxy'"))
end end
templ.render("dnscrypt-proxy/logread", {title = i18n.translate("DNSCrypt-Proxy Logfile"), content = logfile}) templ.render("dnscrypt-proxy/logread", {title = i18n.translate("DNSCrypt-Proxy Logfile"), content = logfile})
end end