Merge pull request #2500 from dibdot/banip

luci-app-banIP: small controller changes
This commit is contained in:
Dirk Brenken 2019-02-02 18:03:43 +01:00 committed by GitHub
commit 7efaac523c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -51,13 +51,7 @@ function status_update()
end end
function log_view() function log_view()
local content local content = util.trim(util.exec("logread -e 'banIP-' 2>/dev/null")) or ""
if nixio.fs.access("/var/log/messages") then
content = util.trim(util.exec("grep -F 'banIP-' /var/log/messages"))
else
content = util.trim(util.exec("logread -e 'banIP-' 2>/dev/null"))
end
if content == "" then if content == "" then
content = "No banIP related logs yet!" content = "No banIP related logs yet!"