|
|
|
@ -4,7 +4,7 @@ APP_NAME="frigate"
|
|
|
|
|
|
|
|
|
|
ACTION="${1}"
|
|
|
|
|
shift 1
|
|
|
|
|
set -x
|
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
|
|
fetch_and_validate_uci () {
|
|
|
|
|
local config_name=$1
|
|
|
|
@ -12,11 +12,11 @@ fetch_and_validate_uci () {
|
|
|
|
|
|
|
|
|
|
local result=$(uci get frigate.$config_name.$config_attr 2>/dev/null)
|
|
|
|
|
if [ -z "$result" ]; then
|
|
|
|
|
echo "Error: $config_name not found in configuration."
|
|
|
|
|
echo "Error: $config_name not found in configuration." >&2
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo "Fetched $config_name from configuration: $result"
|
|
|
|
|
echo "Fetched $config_name from configuration: $result" >&2
|
|
|
|
|
echo $result
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -313,7 +313,7 @@ update_camera_in_yml() {
|
|
|
|
|
|
|
|
|
|
local mask=$(get_uci_camera_value $camera_index "mask")
|
|
|
|
|
if [ -n "$mask" ]; then
|
|
|
|
|
set_yml_value $name ".motion.mask" $mask
|
|
|
|
|
set_yml_value $name ".motion.mask" "[\"$mask\"]"
|
|
|
|
|
else
|
|
|
|
|
echo "Mask is empty, ignoring."
|
|
|
|
|
fi
|
|
|
|
|