2018-11-25 15:05:26 +00:00
|
|
|
from django.apps import AppConfig
|
|
|
|
|
2019-02-09 17:00:08 +00:00
|
|
|
import glob
|
|
|
|
import os
|
|
|
|
|
2019-04-21 07:39:44 +00:00
|
|
|
|
2018-11-25 15:05:26 +00:00
|
|
|
class ManagerConfig(AppConfig):
|
|
|
|
name = 'manager'
|
2019-04-21 07:49:53 +00:00
|
|
|
verbose_name = 'Remote VR Management'
|
2019-01-18 12:50:41 +00:00
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
from .logger import logger
|
2019-02-09 17:00:08 +00:00
|
|
|
|
|
|
|
for device in glob.glob("/opt/vpnmanager/imagebuilder/*"):
|
2019-04-21 07:49:53 +00:00
|
|
|
if glob.glob(device + "/.kumilock"):
|
2019-02-09 17:00:08 +00:00
|
|
|
os.remove(device + "/.kumilock")
|