Merge remote-tracking branch 'Riley-Gitty/main' into main

main
Jason Hawks 1 year ago
commit f7521c5bb5

@ -118,7 +118,7 @@ o.rmempty = false
o = s:taboption("setup", ListValue, "role", translate("Mesh Mode")) o = s:taboption("setup", ListValue, "role", translate("Mesh Mode"))
o:value("off", translate("Node")) o:value("off", translate("Node"))
o:value("server", translate("Server")) o:value("server", translate("Server"))
o:value("client", translate("Client (advanced)")) --o:value("client", translate("Client (advanced)"))
o:depends("enabled", 1) o:depends("enabled", 1)
o.rmempty = false o.rmempty = false
@ -231,14 +231,13 @@ ctrl.anonymous = true
ctrl.addremove = false ctrl.addremove = false
btnStart = ctrl:option(Button, "_btn_start", translate("Enable Easy Mesh")) function m.on_after_commit(self)
function btnStart.write() local enabled = m:formvalue("cbid.easymesh.easymesh.enabled")
io.popen("/easymesh/easymesh.sh start") if enabled and enabled == "1" then
luci.sys.call("/easymesh/easymesh.sh start &")
else
luci.sys.call("/easymesh/easymesh.sh stop &")
end end
btnStop = ctrl:option(Button, "_btn_stop", translate("Disable Easy Mesh"))
function btnStop.write()
io.popen("/easymesh/easymesh.sh stop")
end end
function o.write(self, section, value) function o.write(self, section, value)

Loading…
Cancel
Save