remove log file when stopping instance
This commit is contained in:
parent
f7da682e33
commit
e247f04bab
@ -101,6 +101,10 @@ class Openvpn:
|
|||||||
|
|
||||||
self.status = IDLE
|
self.status = IDLE
|
||||||
self.run_task.cancel()
|
self.run_task.cancel()
|
||||||
|
try:
|
||||||
|
os.remove(self.log_fp)
|
||||||
|
except Exception as err:
|
||||||
|
print("cannot remove log file, error:", err)
|
||||||
|
|
||||||
async def restart(self):
|
async def restart(self):
|
||||||
await self.stop()
|
await self.stop()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user