Fixed yq syntax

pull/3/head
riley 1 year ago
parent e07da23f19
commit cfeecbdf1f

@ -203,7 +203,16 @@ sync_camera_config() {
done
# Then, handle deletions:
local cameras_in_yml=$(yq eval '.cameras | keys[]' /opt/docker2/compose/frigate/config.yml)
local num_cameras=$(yq eval '.cameras | length' /opt/docker2/compose/frigate/config.yml 2>/dev/null)
local i=0
local cameras_in_yml=""
while [ "$i" -lt "$num_cameras" ]; do
local camera_name=$(yq eval ".cameras | keys[$i]" /opt/docker2/compose/frigate/config.yml 2>/dev/null)
cameras_in_yml="$cameras_in_yml $camera_name"
i=$((i+1))
done
echo "Checking for cameras in YML that are not in UCI..."
for camera_name in $cameras_in_yml; do
echo "Validating camera: $camera_name in UCI"

Loading…
Cancel
Save