luci-app-ssr-plus: display log when enable socks5 server only

This commit is contained in:
lean 2020-04-04 00:18:26 +08:00
parent 8faac30089
commit d0922b9398
2 changed files with 13 additions and 10 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=175
PKG_RELEASE:=4
PKG_RELEASE:=5
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@ -1,16 +1,19 @@
local fs = require "nixio.fs"
f = SimpleForm("logview")
f.reset = false
f.submit = false
t = f:field(TextValue, "conf")
t.rmempty = true
t.rows = 20
function t.cfgvalue()
local logs = luci.util.execi("cat /tmp/ssrplus.log")
local s = ""
for line in logs do
s = line .. "\n" .. s
end
return s
if fs.access("/tmp/ssrplus.log") then
local logs = luci.util.execi("cat /tmp/ssrplus.log")
local s = ""
for line in logs do
s = line .. "\n" .. s
end
return s
end
end
t.readonly="readonly"