Overwrite existing config

This commit is contained in:
Nicolas Mowen 2024-04-12 08:55:43 -06:00
parent 229bc08ac9
commit 9fb74d14d7

View File

@ -41,12 +41,12 @@ def migrate_frigate_config(config_file: str):
if previous_version < 0.14: if previous_version < 0.14:
logger.info(f"Migrating frigate config from {previous_version} to 0.14...") logger.info(f"Migrating frigate config from {previous_version} to 0.14...")
new_config = migrate_014(config) new_config = migrate_014(config)
with open(os.path.join(CONFIG_DIR, "new_config.yaml"), "w") as f: with open(config_file, "w") as f:
yaml.dump(new_config, f) yaml.dump(new_config, f)
previous_version = 0.14 previous_version = 0.14
#with open(version_file, "w") as f: with open(version_file, "w") as f:
# f.write(str(CURRENT_CONFIG_VERSION)) f.write(str(CURRENT_CONFIG_VERSION))
logger.info("Finished frigate config migration...") logger.info("Finished frigate config migration...")