diff --git a/luasrc/model/cbi/easymesh.lua b/luasrc/model/cbi/easymesh.lua index e8be5f9..d1d64af 100755 --- a/luasrc/model/cbi/easymesh.lua +++ b/luasrc/model/cbi/easymesh.lua @@ -1,4 +1,4 @@ --- Copyright (C) 2021 dz +-- PrivateRouter Easy Mesh local m,s,o local sys = require "luci.sys" @@ -45,6 +45,11 @@ s.anonymous = true o = s:option(Flag, "enabled", translate("Enable"), translate("Enable or disable EASY MESH")) o.default = 0 o.rmempty = false +function o.write(self, section, value) + Flag.write(self, section, value) + -- Run your custom command here. + luci.sys.call("/etc/init.d/easymesh start") +end o = s:option(ListValue, "role", translate("role")) o:value("off", translate("off"))