summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-banip/luasrc/controller
diff options
context:
space:
mode:
authorDirk Brenken <dev@brenken.org>2019-02-02 18:03:43 +0100
committerGitHub <noreply@github.com>2019-02-02 18:03:43 +0100
commit7efaac523c69da75d9c9678d8310c94dcc7d70cb (patch)
treee49acf231204461e05b34ec0456ee6a7f26fc339 /applications/luci-app-banip/luasrc/controller
parentea2e4a2cf30f86ef871d3f76f02691f627bdf0b8 (diff)
parent2ba9325788f80cc803fd8af49bb492cc09725285 (diff)
Merge pull request #2500 from dibdot/banip
luci-app-banIP: small controller changes
Diffstat (limited to 'applications/luci-app-banip/luasrc/controller')
-rw-r--r--applications/luci-app-banip/luasrc/controller/banip.lua8
1 files changed, 1 insertions, 7 deletions
diff --git a/applications/luci-app-banip/luasrc/controller/banip.lua b/applications/luci-app-banip/luasrc/controller/banip.lua
index 3d75bec4d0..42328d7ea4 100644
--- a/applications/luci-app-banip/luasrc/controller/banip.lua
+++ b/applications/luci-app-banip/luasrc/controller/banip.lua
@@ -51,13 +51,7 @@ function status_update()
end
function log_view()
- local content
-
- 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
+ local content = util.trim(util.exec("logread -e 'banIP-' 2>/dev/null")) or ""
if content == "" then
content = "No banIP related logs yet!"