Merge r4178
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 28 Jan 2009 18:32:47 +0000 (18:32 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 28 Jan 2009 18:32:47 +0000 (18:32 +0000)
applications/luci-upnp/luasrc/model/cbi/upnp/upnp.lua
applications/luci-upnp/luasrc/model/cbi/upnp/upnpmini.lua

index a485081297158d500c403469b0607a7cbd2627d4..97fe88e6c20364be6ad12ff6a4c24a2989a90fef 100644 (file)
@@ -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
 
index 8ad03a36a0ef97dc08514616381d6dd26ec375a6..3e19b9573447356fabac0caade650bf367a8a4ea 100644 (file)
@@ -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