From 8eb3ddbea8e5b3953e9f39347b2c81aa6a89cf7a Mon Sep 17 00:00:00 2001 From: riley Date: Thu, 28 Sep 2023 18:42:47 -0400 Subject: [PATCH] WIP Still trying to clean up yml comment sync --- root/usr/libexec/apps/frigate/frigate.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/root/usr/libexec/apps/frigate/frigate.sh b/root/usr/libexec/apps/frigate/frigate.sh index a339a3e..68e7fb3 100755 --- a/root/usr/libexec/apps/frigate/frigate.sh +++ b/root/usr/libexec/apps/frigate/frigate.sh @@ -4,7 +4,7 @@ APP_NAME="frigate" ACTION="${1}" shift 1 -set -x +#set -x fetch_and_validate_uci () { 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 } - update_camera_in_yml() { local name=$1 @@ -324,10 +323,10 @@ sync_camera_config() { camera_index=0 # 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" - + # Loop through all camera configs in UCI using index while true; do # Try to fetch camera configuration