applications/luci-upnp: fix enable checkbox of upnp service

This commit is contained in:
Jo-Philipp Wich 2009-01-28 18:25:11 +00:00
parent 4b62df0945
commit 4fa887618e
2 changed files with 4 additions and 0 deletions

View file

@ -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)

View file

@ -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)