From: Jo-Philipp Wich Date: Wed, 28 Jan 2009 18:32:47 +0000 (+0000) Subject: Merge r4178 X-Git-Tag: 0.8.5~19 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=242bffe894f2fc7ca1ba196f27da4dee03e9f6a9;p=project%2Fluci.git Merge r4178 --- diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua index a485081297..97fe88e6c2 100644 --- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua +++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua @@ -20,6 +20,9 @@ e.rmempty = false function e.write(self, section, value) local cmd = (value == "1") and "enable" or "disable" + if value ~= "1" then + os.execute("/etc/init.d/miniupnpd stop") + end os.execute("/etc/init.d/miniupnpd " .. cmd) end diff --git a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua index 8ad03a36a0..3e19b95734 100644 --- a/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua +++ b/applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua @@ -20,6 +20,9 @@ e.rmempty = false function e.write(self, section, value) local cmd = (value == "1") and "enable" or "disable" + if value ~= "1" then + os.execute("/etc/init.d/miniupnpd stop") + end os.execute("/etc/init.d/miniupnpd " .. cmd) end