From 1cb159cd8016bfc729882405e32b546624a39c5c Mon Sep 17 00:00:00 2001 From: Milsim DK Date: Thu, 20 Jun 2024 22:51:19 +0200 Subject: [PATCH] Working on v1.2.0 --- entrypoint.d/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoint.d/__init__.py b/entrypoint.d/__init__.py index 1ec0ae6..17fe5b3 100644 --- a/entrypoint.d/__init__.py +++ b/entrypoint.d/__init__.py @@ -6,6 +6,7 @@ config_file = os.path.join( os.environ.get("DOCKER_OTS_DATA_FOLDER", "/app/ots/"), "config.yml" ); config = FlaskConfig(config_file); +#************ HELPERS ************ def save_config(config): global config_file try: @@ -15,9 +16,10 @@ def save_config(config): except BaseException as e: print("Container init | Failed to save config.yml: {}".format(e)) +#************ INIT ************ # Get config file, # Load config.yml if it exists -if not os.path.exists(config_file) or os.environ.get("DOCKER_CONFIG_OVERWRITE", False): +if not os.path.exists(config_file) or bool( yaml.safe_load( os.environ.get("DEV_CONFIG_OVERWRITE", False) ) ): print("Container init | Creating config.yml") # Get default config from opentakserver