diff options
author | Dirk Brenken <dev@brenken.org> | 2018-01-27 18:13:52 +0100 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2018-01-31 13:09:55 +0100 |
commit | 47e0990eac855f09d479f8d1f5b4fe19709a25de (patch) | |
tree | 2b6c08dd4d8c6f6e42190cce6e115a5df69adb28 /applications/luci-app-adblock/luasrc/controller | |
parent | 08916f4335e96e4a3c9dcf77262fa151348ed93c (diff) |
luci-app-adblock: sync with adblock 3.5.0
* Support new 'Download Queue'
* Support new 'Jail' Blocklist Creation
(replace former 'Whitelist Mode')
* Fix field width in "Runtime Information" section
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-adblock/luasrc/controller')
-rw-r--r-- | applications/luci-app-adblock/luasrc/controller/adblock.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/applications/luci-app-adblock/luasrc/controller/adblock.lua b/applications/luci-app-adblock/luasrc/controller/adblock.lua index 0cfbb5f7f6..d4368e7890 100644 --- a/applications/luci-app-adblock/luasrc/controller/adblock.lua +++ b/applications/luci-app-adblock/luasrc/controller/adblock.lua @@ -27,7 +27,7 @@ function logread() local logfile if nixio.fs.access("/var/log/messages") then - logfile = util.trim(util.exec("cat /var/log/messages | grep -F 'adblock-'")) + logfile = util.trim(util.exec("grep -F 'adblock-' /var/log/messages")) else logfile = util.trim(util.exec("logread -e 'adblock-'")) end @@ -35,7 +35,7 @@ function logread() end function queryData(domain) - if domain and domain:match("^[a-zA-Z0-9%-%._]+$") then + if domain then luci.http.prepare_content("text/plain") local cmd = "/etc/init.d/adblock query %q 2>&1" local util = io.popen(cmd % domain) |