luci-app-openvpn: use initscript to stop instances

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
This commit is contained in:
Martin Schiller 2017-12-19 09:53:19 +01:00
parent 63efc28d48
commit bab9c12e20

View file

@ -103,10 +103,7 @@ function updown.cfgvalue(self, section)
end
function updown.write(self, section, value)
if self.option == "stop" then
local pid = s.getPID(section)
if pid ~= nil then
sys.process.signal(pid,15)
end
luci.sys.call("/etc/init.d/openvpn stop %s" % section)
else
luci.sys.call("/etc/init.d/openvpn start %s" % section)
end