Automatically remove any surviving kumilocks on startup

This commit is contained in:
Kumi 2019-02-09 17:00:08 +00:00
parent 5c885db6b1
commit 59c340fd24

View file

@ -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