generate config after supervisor data is loaded

This commit is contained in:
Nicolas Mowen 2023-11-18 16:53:42 -07:00 committed by GitHub
parent 6463e54a8d
commit ba8a0d1fbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,11 +51,12 @@ if [[ -f "/dev/shm/go2rtc.yaml" ]]; then
if [[ ! -f "/dev/shm/go2rtc.yaml" ]]; then
echo "[INFO] Preparing new go2rtc config..."
python3 /usr/local/go2rtc/create_config.py
if [[ -n "${SUPERVISOR_TOKEN:-}" ]]; then
# Running as a Home Assistant add-on, infer the IP address and port
get_ip_and_port_from_supervisor
python3 /usr/local/go2rtc/create_config.py
fi
else
echo "[WARNING] Unable to remove existing go2rtc config. Changes made to your frigate config file may not be recognized. Please remove the /dev/shm/go2rtc.yaml from your docker host manually."