Standardize handling of config files (#15451)

* Standardize handling of config files

* Formatting

* Remove unused
This commit is contained in:
Nicolas Mowen
2024-12-11 18:46:42 -06:00
committed by GitHub
parent 6b12a45a95
commit 0e3fb6cbdd
5 changed files with 22 additions and 40 deletions
+10
View File
@@ -14,6 +14,16 @@ from frigate.util.services import get_video_properties
logger = logging.getLogger(__name__)
CURRENT_CONFIG_VERSION = "0.15-0"
DEFAULT_CONFIG_FILE = "/config/config.yml"
def find_config_file() -> str:
config_path = os.environ.get("CONFIG_FILE", DEFAULT_CONFIG_FILE)
if not os.path.isfile(config_path):
config_path = config_path.replace("yml", "yaml")
return config_path
def migrate_frigate_config(config_file: str):