applications/luci-upnp: also stop miniupnpd if it is about to be disabled
This commit is contained in:
parent
4fa887618e
commit
d5003fc23a
2 changed files with 6 additions and 0 deletions
|
@ -20,6 +20,9 @@ e.rmempty = false
|
||||||
|
|
||||||
function e.write(self, section, value)
|
function e.write(self, section, value)
|
||||||
local cmd = (value == "1") and "enable" or "disable"
|
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)
|
os.execute("/etc/init.d/miniupnpd " .. cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,9 @@ e.rmempty = false
|
||||||
|
|
||||||
function e.write(self, section, value)
|
function e.write(self, section, value)
|
||||||
local cmd = (value == "1") and "enable" or "disable"
|
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)
|
os.execute("/etc/init.d/miniupnpd " .. cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue