Create necessary directories for cache, external plugins, pro plugins in case they are missing

This commit is contained in:
Théophile Diot 2024-03-27 10:33:38 +00:00
parent ead4c936e0
commit fe55738c45
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -35,8 +35,11 @@ from JobScheduler import JobScheduler
RUN = True
SCHEDULER: Optional[JobScheduler] = None
CACHE_PATH = join(sep, "var", "cache", "bunkerweb")
Path(CACHE_PATH).mkdir(parents=True, exist_ok=True)
EXTERNAL_PLUGINS_PATH = Path(sep, "etc", "bunkerweb", "plugins")
EXTERNAL_PLUGINS_PATH.mkdir(parents=True, exist_ok=True)
PRO_PLUGINS_PATH = Path(sep, "etc", "bunkerweb", "pro", "plugins")
PRO_PLUGINS_PATH.mkdir(parents=True, exist_ok=True)
TMP_PATH = Path(sep, "var", "tmp", "bunkerweb")
TMP_PATH.mkdir(parents=True, exist_ok=True)
HEALTHY_PATH = TMP_PATH.joinpath("scheduler.healthy")