luci-app-banIP: small controller changes 2500/head
authorDirk Brenken <dev@brenken.org>
Sat, 2 Feb 2019 07:56:39 +0000 (08:56 +0100)
committerDirk Brenken <dev@brenken.org>
Sat, 2 Feb 2019 07:56:39 +0000 (08:56 +0100)
- remove needless Turris Omnia logread workaround, due to changes in
latest syslog-ng package

Signed-off-by: Dirk Brenken <dev@brenken.org>
applications/luci-app-banip/luasrc/controller/banip.lua

index 3d75bec4d06abdceedc742c25c822e3253a5c0a1..42328d7ea4f7d60e4ce8fffd247c64975d37435b 100644 (file)
@@ -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!"