common var fix

This commit is contained in:
2026-05-04 18:03:51 -04:00
parent ec7de648dc
commit 35707a4191
2 changed files with 13 additions and 12 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ claude
arrs system error, can we delete movies from lidar when dropped from tmdb, 99% of the time its future movies that get dropped
arrs system error, can we delete movies from radar when dropped from tmdb, 99% of the time its future movies that get dropped
movie Silent Hill 2: The Movie (tmdbid 466226) was removed from TMDb
@@ -22,7 +22,7 @@ later.
. add a script to check all docker containers and update any that still need it to run after the containers that get synced and updated.
. add a script to find missing artist and album cover from fanart and itunes, or itunes as a fallback
+11 -10
View File
@@ -463,8 +463,8 @@ detect_hosts() {
fi
# ── Set scalar aliases ────────────────────────────────────────────────────
MY_DISCORD_WEBHOOK="${!MY_ID}_DISCORD_WEBHOOK"
MY_DISCORD_WEBHOOK="${!MY_DISCORD_WEBHOOK:-}"
MY_DISCORD_WEBHOOK_VAR="${MY_ID}_DISCORD_WEBHOOK"
MY_DISCORD_WEBHOOK="${!MY_DISCORD_WEBHOOK_VAR:-}"
EMBY_CONTAINER_VAR="${MY_ID}_EMBY_CONTAINER"
EMBY_CONTAINER="${!EMBY_CONTAINER_VAR:-}"
@@ -563,14 +563,14 @@ detect_hosts() {
_alias_assoc() {
local alias_name="$1"
local source_var="${MY_ID}_${alias_name}"
# Declare the alias as associative
local source_name="${MY_ID}_${alias_name}"
eval "declare -gA ${alias_name}"
# Copy each key from source to alias
local key
eval "for key in \"\${!${source_var}[@]:-}\"; do
eval \"${alias_name}[\\\"\$key\\\"]=\\\"\${${source_var}[\\\"\$key\\\"]}\\\"\"
done"
local -n _assoc_src="${source_name}" 2>/dev/null || return 0
local -n _assoc_dst="${alias_name}"
local _assoc_key
for _assoc_key in "${!_assoc_src[@]}"; do
_assoc_dst["$_assoc_key"]="${_assoc_src[$_assoc_key]}"
done
}
_alias_assoc "WATCHDOG_CONTAINERS"
@@ -1580,7 +1580,8 @@ check_unraid_version_parity() {
fi
# Read remote version via SSH
remote_version=$(ssh -i "$SSH_KEY" -o ConnectTimeout=10 root@"$REMOTE_SERVER" "grep -oP '(?<=version=")[^"]+' /etc/unraid-version 2>/dev/null" 2>/dev/null)
remote_version=$(ssh -i "$SSH_KEY" -o ConnectTimeout=10 root@"$REMOTE_SERVER" \
"grep -oP '(?<=version=\")[^\"]+' /etc/unraid-version 2>/dev/null" 2>/dev/null)
if [[ -z "$remote_version" ]]; then
warn "Cannot read remote unRAID version from $REMOTE_SERVER_NAME — skipping parity check"
return 0