summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-upnp
diff options
context:
space:
mode:
Diffstat (limited to 'applications/luci-upnp')
-rw-r--r--applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua2
-rw-r--r--applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua2
2 files changed, 4 insertions, 0 deletions
diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
index 8d5a592b11..a485081297 100644
--- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
+++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
@@ -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)
diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua
index aaec3b0ccf..8ad03a36a0 100644
--- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua
+++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua
@@ -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)