luci-app-openvpn: use initscript to stop instances
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This commit is contained in:
parent
63efc28d48
commit
bab9c12e20
1 changed files with 1 additions and 4 deletions
|
@ -103,10 +103,7 @@ function updown.cfgvalue(self, section)
|
||||||
end
|
end
|
||||||
function updown.write(self, section, value)
|
function updown.write(self, section, value)
|
||||||
if self.option == "stop" then
|
if self.option == "stop" then
|
||||||
local pid = s.getPID(section)
|
luci.sys.call("/etc/init.d/openvpn stop %s" % section)
|
||||||
if pid ~= nil then
|
|
||||||
sys.process.signal(pid,15)
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
luci.sys.call("/etc/init.d/openvpn start %s" % section)
|
luci.sys.call("/etc/init.d/openvpn start %s" % section)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue