WIP Still trying to clean up yml comment sync

pull/3/head
riley 1 year ago
parent f899aa3903
commit 8eb3ddbea8

@ -4,7 +4,7 @@ APP_NAME="frigate"
ACTION="${1}" ACTION="${1}"
shift 1 shift 1
set -x #set -x
fetch_and_validate_uci () { fetch_and_validate_uci () {
local config_name=$1 local config_name=$1
@ -281,7 +281,6 @@ remove_warning_comments() {
yq eval '.cameras.'$name'.motion.mask line_comment=""' -i /opt/docker2/compose/frigate/config.yml yq eval '.cameras.'$name'.motion.mask line_comment=""' -i /opt/docker2/compose/frigate/config.yml
} }
update_camera_in_yml() { update_camera_in_yml() {
local name=$1 local name=$1
@ -324,10 +323,10 @@ sync_camera_config() {
camera_index=0 camera_index=0
# Fetching all cameras from frigate YML # Fetching all cameras from frigate YML
yml_cameras=$(yq eval '.cameras | keys' /opt/docker2/compose/frigate/config.yml | sed 's/- //g' | xargs) yml_cameras=$(yq eval '... comments="" | .cameras | keys' /opt/docker2/compose/frigate/config.yml | sed 's/- //g' | xargs)
echo "Cameras fetched from YML: $yml_cameras" echo "Cameras fetched from YML: $yml_cameras"
# Loop through all camera configs in UCI using index # Loop through all camera configs in UCI using index
while true; do while true; do
# Try to fetch camera configuration # Try to fetch camera configuration

Loading…
Cancel
Save