Testing apmode

main
Jason Hawks 1 year ago
parent 8795a06651
commit 750ce5b6e5

@ -191,7 +191,7 @@ low_rssi_val:depends("kvr", 1)
-- s.anonymous = true -- s.anonymous = true
---- ap_mode ---- ap_mode
o = s:taboption("apmode", Value, "gateway", translate("Node Hostname")) o = s:taboption("apmode", Value, "hostname", translate("Node Hostname"))
o.default = "node2" o.default = "node2"
o:value("node2", "node2") o:value("node2", "node2")
o:value("node3", "node3") o:value("node3", "node3")
@ -206,7 +206,7 @@ o:depends("role", "off")
btnAPMode = s:taboption("apmode", Button, "_btn_apmode", translate("Join Mesh Network"), translate("WARNING: THIS WILL CHANGE THIS NODE'S IP ADDRESS, YOU WILL LOOSE ACCESS TO THIS UI")) btnAPMode = s:taboption("apmode", Button, "_btn_apmode", translate("Join Mesh Network"), translate("WARNING: THIS WILL CHANGE THIS NODE'S IP ADDRESS, YOU WILL LOOSE ACCESS TO THIS UI"))
function btnAPMode.write() function btnAPMode.write()
luci.sys.call("/easymesh/easymesh.sh apmode") luci.sys.call("bash /easymesh/dumbap.sh")
end end
btnAPMode:depends("role", "off") btnAPMode:depends("role", "off")
---- ip address ---- ip address
@ -234,9 +234,9 @@ ctrl.addremove = false
function m.on_after_commit(self) function m.on_after_commit(self)
local enabled = m:formvalue("cbid.easymesh.easymesh.enabled") local enabled = m:formvalue("cbid.easymesh.easymesh.enabled")
if enabled and enabled == "1" then if enabled and enabled == "1" then
luci.sys.call("/easymesh/easymesh.sh start &") luci.sys.call("bash /easymesh/easymesh.sh start &")
else else
luci.sys.call("/easymesh/easymesh.sh stop &") luci.sys.call("bash /easymesh/easymesh.sh stop &")
end end
end end

@ -103,3 +103,5 @@ set_apmode() {
/etc/init.d/network reload /etc/init.d/network reload
fi fi
} }
set_apmode
Loading…
Cancel
Save