applications/luci-upnp: also stop miniupnpd if it is about to be disabled

This commit is contained in:
Jo-Philipp Wich 2009-01-28 18:32:26 +00:00
parent 4fa887618e
commit d5003fc23a
2 changed files with 6 additions and 0 deletions

View 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

View 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