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}"
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,7 +323,7 @@ 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"

Loading…
Cancel
Save