1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00
openmptcprouter-feeds/luci-app-zerotier-master/luasrc/model/cbi/zerotier/info.lua
2023-07-09 01:56:15 +08:00

15 lines
No EOL
331 B
Lua

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