1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/luci-app-zerotier/luasrc/model/cbi/zerotier/info.lua
2023-07-24 15:26:29 +08:00

15 lines
363 B
Lua
Executable file

local fs = require "nixio.fs"
local conffile = "/tmp/zero.info"
f = SimpleForm("logview")
t = f:field(TextValue, "conf")
t.rmempty = true
t.rows = 19
function t.cfgvalue()
luci.sys.exec("for i in $(ifconfig | grep 'zt' | awk '{print $1}'); do ifconfig $i; done > /tmp/zero.info")
return fs.readfile(conffile) or ""
end
t.readonly = "readonly"
return f