diff --git a/openvpn.py b/openvpn.py index 757c9a9..81b2e7a 100644 --- a/openvpn.py +++ b/openvpn.py @@ -6,6 +6,7 @@ import tempfile import os import time import openvpn_api +import signal def generate_config(in_fp, cfg): @@ -94,7 +95,7 @@ class Openvpn: async def stop(self): if self.status == RUNNING: try: - os.kill(self.PID) + os.kill(self.PID, signal.SIGKILL) except Exception as err: print("kill failed:", err)