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
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue