Fix potential issue with config saver and non Docker and Linux integrations

This commit is contained in:
Théophile Diot 2023-12-01 10:38:23 +01:00
parent 4c109bfe50
commit ff65d00819
No known key found for this signature in database
GPG Key ID: 248FEA4BAE400D06
1 changed files with 28 additions and 23 deletions

View File

@ -584,30 +584,35 @@ if __name__ == "__main__":
logger.info("External plugins changed, generating ...")
if FIRST_RUN:
# run the config saver to save potential ignored external plugins settings
logger.info("Running config saver to save potential ignored external plugins settings ...")
proc = subprocess_run(
[
"python",
join(
sep,
"usr",
"share",
"bunkerweb",
"gen",
"save_config.py",
),
"--settings",
join(sep, "usr", "share", "bunkerweb", "settings.json"),
],
stdin=DEVNULL,
stderr=STDOUT,
check=False,
)
if proc.returncode != 0:
logger.error(
"Config saver failed, configuration will not work as expected...",
if INTEGRATION not in (
"Swarm",
"Kubernetes",
"Autoconf",
):
# run the config saver to save potential ignored external plugins settings
logger.info("Running config saver to save potential ignored external plugins settings ...")
proc = subprocess_run(
[
"python",
join(
sep,
"usr",
"share",
"bunkerweb",
"gen",
"save_config.py",
),
"--settings",
join(sep, "usr", "share", "bunkerweb", "settings.json"),
],
stdin=DEVNULL,
stderr=STDOUT,
check=False,
)
if proc.returncode != 0:
logger.error(
"Config saver failed, configuration will not work as expected...",
)
changes.update(
{