applications/luci-upnp: fix enable checkbox of upnp service
This commit is contained in:
parent
4b62df0945
commit
4fa887618e
2 changed files with 4 additions and 0 deletions
|
@ -16,6 +16,8 @@ m = Map("upnpd", translate("upnpd"), translate("upnpd_desc"))
|
|||
|
||||
s = m:section(NamedSection, "config", "upnpd", "")
|
||||
e = s:option(Flag, "enabled", translate("enable"))
|
||||
e.rmempty = false
|
||||
|
||||
function e.write(self, section, value)
|
||||
local cmd = (value == "1") and "enable" or "disable"
|
||||
os.execute("/etc/init.d/miniupnpd " .. cmd)
|
||||
|
|
|
@ -16,6 +16,8 @@ m = Map("upnpd", translate("upnpd"), translate("upnpd_desc"))
|
|||
|
||||
s = m:section(NamedSection, "config", "upnpd", "")
|
||||
e = s:option(Flag, "enabled", translate("enable"))
|
||||
e.rmempty = false
|
||||
|
||||
function e.write(self, section, value)
|
||||
local cmd = (value == "1") and "enable" or "disable"
|
||||
os.execute("/etc/init.d/miniupnpd " .. cmd)
|
||||
|
|
Loading…
Reference in a new issue