Merge pull request #2500 from dibdot/banip
luci-app-banIP: small controller changes
This commit is contained in:
commit
7efaac523c
1 changed files with 1 additions and 7 deletions
|
@ -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!"
|
||||||
|
|
Loading…
Reference in a new issue