frigate: stop the detector config from replacing the base config

The install wrote a config with mqtt, cameras, auth and detect, then the
detector branch wrote the file again instead of adding to it. Both
branches used a single redirect, so everything above them was discarded
and the result had neither mqtt nor cameras. frigate/config/config.py
declares both as Field() without a default, in 0.17.2 as well as in
0.18.0, so Frigate rejected the file and came up in safe mode:

  mqtt - Field required
  cameras - Field required

Move hwaccel_args into the base block, since both branches set it, and
append the detector and model sections instead of overwriting.

Checked by generating both branches and parsing the result: the OpenVINO
path yields auth, cameras, detect, detectors, ffmpeg, model, mqtt, the
CPU path the same without detectors, and the test camera survives in
both.
This commit is contained in:
MickLesk
2026-09-15 10:46:33 +02:00
parent a1786a35dc
commit 4c8411fc5e

View File

@@ -288,12 +288,12 @@ auth:
enabled: false
detect:
enabled: false
ffmpeg:
hwaccel_args: auto
EOF
if grep -q -o -m1 -E 'avx[^ ]*|sse4_2' /proc/cpuinfo && [[ -f /openvino-model/ssdlite_mobilenet_v2.xml ]] && [[ -f /openvino-model/coco_91cl_bkgr.txt ]]; then
cat <<EOF >/config/config.yml
ffmpeg:
hwaccel_args: auto
cat <<EOF >>/config/config.yml
detectors:
detector01:
type: openvino
@@ -307,9 +307,7 @@ model:
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
EOF
else
cat <<EOF >/config/config.yml
ffmpeg:
hwaccel_args: auto
cat <<EOF >>/config/config.yml
model:
path: /models/cpu_model.tflite
EOF