Automatically remove any surviving kumilocks on startup
This commit is contained in:
parent
5c885db6b1
commit
59c340fd24
1 changed files with 9 additions and 0 deletions
|
@ -1,8 +1,17 @@
|
|||
from django.apps import AppConfig
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
class ManagerConfig(AppConfig):
|
||||
name = 'manager'
|
||||
verbose_name = 'VPN360 Management'
|
||||
|
||||
def ready(self):
|
||||
from .logger import logger
|
||||
|
||||
for device in glob.glob("/opt/vpnmanager/imagebuilder/*"):
|
||||
try:
|
||||
os.remove(device + "/.kumilock")
|
||||
except:
|
||||
pass
|
||||
|
|
Loading…
Reference in a new issue