Don't handle env variable substitution

This commit is contained in:
Nick Mowen 2023-01-16 16:33:42 -07:00
parent aeec895f27
commit 6cde94b52e

View File

@ -5,7 +5,6 @@ import os
import yaml import yaml
FRIGATE_ENV_VARS = {k: v for k, v in os.environ.items() if k.startswith("FRIGATE_")}
config_file = os.environ.get("CONFIG_FILE", "/config/config.yml") config_file = os.environ.get("CONFIG_FILE", "/config/config.yml")
# Check if we can use .yaml instead of .yml # Check if we can use .yaml instead of .yml
@ -29,7 +28,4 @@ if not go2rtc_config.get("log", {}).get("format"):
if not go2rtc_config.get("webrtc", {}).get("candidates", []): if not go2rtc_config.get("webrtc", {}).get("candidates", []):
go2rtc_config["webrtc"] = {"candidates": ["stun:8555"]} go2rtc_config["webrtc"] = {"candidates": ["stun:8555"]}
for name in go2rtc_config.get("streams", {}):
go2rtc_config["streams"][name] = go2rtc_config["streams"][name].format(**FRIGATE_ENV_VARS)
print(json.dumps(go2rtc_config)) print(json.dumps(go2rtc_config))