v2 post-migration bug fixes, lidarr_missing_art port, and Partnership SSH/FolderView3 enhancements
Bug fixes across the ecosystem after v1→v2 architecture migration and Unraid 7.2.5 upgrade:
- common.sh: fix _alias_array() phantom empty element (removed [@]:-} pattern), fix
resolve_remote_ip() with Tailscale FQDN lowercase + awk fallback, add FANART/LASTFM
key aliases in detect_hosts(), global [@]:-} sweep across 10+ scripts
- webgui_restart.sh: fix emhttp detection (pgrep emhttpd) and restart command for 7.2.5
(/usr/local/sbin/emhttp stop && start — rc.emhttp removed in 7.2.5)
- bandwidth_monitor.sh, continuous_scripts_status.sh: fix 'local' keyword outside function
- backup_verify.sh: fix resolve_remote_ip() called before detect_hosts()
- Orchestrators: fix script display duplication bug in status output (${entry##*/})
- rsync_stop.sh, git_pull_execute.sh, partnership_manager.sh, coffee_report: lowercase all
tailscale ip -4 call sites to match Tailscale's lowercase device names
- master_host1.conf: fix SSH key path (gmer4lfe_rsync_automation), add FANART/LASTFM keys
- master_host2.conf: add FANART/LASTFM API keys
New: Media/lidarr_missing_art.sh
- Full ecosystem port of standalone Lidarr artwork fetcher
- Fetches missing album art via fanart.tv + Last.fm APIs
- @tsv batch extraction: 1 jq call per API response vs N*albums (8050 albums in 24s)
- HOST guard (HOST1 only), --status, --dry-run, acquire_lock
New: Initial_run/ssh_setup.sh
- Generates {hostname}_rsync_automation ed25519 keypair (skip if exists, --force to regen)
- ssh-copy-id to remote via Tailscale IP, auto-updates master_host*.conf
- --validate mode: strike tracking (SSH_MAX_STRIKES, SSH_STRIKE_RESET_HRS),
notify at limit — Tailscale-unreachable remote does NOT count as SSH strike
New: Initial_run/partnership_onboard.sh
- Orchestrator: ssh_setup.sh then partnership_manager.sh --onboard in one command
Partnership/partnership_manager.sh: FolderView3 integration
- Derive partner folder name at runtime (strip unraid- prefix case-insensitively)
- --onboard: create {Mirror}-Failover folder with failover tier containers
- --offboard (both paths): stop + rm containers in folder, remove JSON entry
- --check: calls ssh_setup.sh --validate when IP resolves but SSH state empty
- --status: shows FolderView3 folder state and containers inline
master.conf: SSH_MAX_STRIKES, SSH_STRIKE_RESET_HRS, PARTNERSHIP_FOLDERVIEW3,
PARTNERSHIP_FOLDERVIEW3_URL added to Partnership section
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7cecda6b90
commit
5526bc1eca
@@ -506,6 +506,8 @@ detect_hosts() {
|
||||
LIDARR_URL_VAR="${MY_ID}_LIDARR_URL"; LIDARR_URL="${!LIDARR_URL_VAR:-}"
|
||||
LIDARR_API_KEY_VAR="${MY_ID}_LIDARR_API_KEY"; LIDARR_API_KEY="${!LIDARR_API_KEY_VAR:-}"
|
||||
LIDARR_MUSIC_ROOT_VAR="${MY_ID}_LIDARR_MUSIC_ROOT"; LIDARR_MUSIC_ROOT="${!LIDARR_MUSIC_ROOT_VAR:-}"
|
||||
FANART_API_KEY_VAR="${MY_ID}_FANART_API_KEY"; FANART_API_KEY="${!FANART_API_KEY_VAR:-}"
|
||||
LASTFM_API_KEY_VAR="${MY_ID}_LASTFM_API_KEY"; LASTFM_API_KEY="${!LASTFM_API_KEY_VAR:-}"
|
||||
|
||||
SONARR_URL_VAR="${MY_ID}_SONARR_URL"; SONARR_URL="${!SONARR_URL_VAR:-}"
|
||||
SONARR_API_KEY_VAR="${MY_ID}_SONARR_API_KEY"; SONARR_API_KEY="${!SONARR_API_KEY_VAR:-}"
|
||||
@@ -533,7 +535,7 @@ detect_hosts() {
|
||||
_alias_array() {
|
||||
local alias_name="$1"
|
||||
local source_var="${MY_ID}_${alias_name}"
|
||||
eval "${alias_name}=(\"\${${source_var}[@]:-}\")"
|
||||
eval "${alias_name}=(\"\${${source_var}[@]}\")"
|
||||
}
|
||||
|
||||
_alias_array "DAILY_SYNC_SHARES"
|
||||
@@ -590,10 +592,19 @@ detect_hosts() {
|
||||
|
||||
resolve_remote_ip() {
|
||||
log "Resolving remote IP for $REMOTE_SERVER_NAME..."
|
||||
REMOTE_SERVER=$(tailscale ip -4 "$REMOTE_SERVER_NAME" 2>/dev/null)
|
||||
local ts_name="${REMOTE_SERVER_NAME,,}"
|
||||
|
||||
# Direct lookup — works when MagicDNS short-name resolution is active
|
||||
REMOTE_SERVER=$(tailscale ip -4 "$ts_name" 2>/dev/null)
|
||||
|
||||
# Fallback — parse tailscale status for FQDN entries (e.g. hostname.tailXXXX.ts.net)
|
||||
if [[ -z "$REMOTE_SERVER" ]]; then
|
||||
REMOTE_SERVER=$(tailscale status 2>/dev/null | awk -v name="$ts_name" '$2 ~ "^" name { print $1; exit }')
|
||||
fi
|
||||
|
||||
if [[ -z "$REMOTE_SERVER" ]]; then
|
||||
error "Failed to resolve Tailscale IP for $REMOTE_SERVER_NAME"
|
||||
error "Check: tailscale status | grep $REMOTE_SERVER_NAME"
|
||||
error "Check: tailscale status | grep $ts_name"
|
||||
exit 1
|
||||
fi
|
||||
info "$ICON_NET Remote IP: $REMOTE_SERVER"
|
||||
@@ -1105,7 +1116,7 @@ start_containers() {
|
||||
for c in "${RUNNING_CONTAINERS[@]}"; do
|
||||
[[ -z "$c" ]] && continue
|
||||
local needs_delay=false
|
||||
for d in "${DELAYED_CONTAINERS[@]:-}"; do
|
||||
for d in "${DELAYED_CONTAINERS[@]}"; do
|
||||
[[ "$c" == "$d" ]] && needs_delay=true && break
|
||||
done
|
||||
if [[ "$needs_delay" == true ]]; then
|
||||
@@ -1133,7 +1144,7 @@ start_local_containers() {
|
||||
for c in "${LOCAL_RUNNING_CONTAINERS[@]}"; do
|
||||
[[ -z "$c" ]] && continue
|
||||
local needs_delay=false
|
||||
for d in "${DELAYED_CONTAINERS[@]:-}"; do
|
||||
for d in "${DELAYED_CONTAINERS[@]}"; do
|
||||
[[ "$c" == "$d" ]] && needs_delay=true && break
|
||||
done
|
||||
if [[ "$needs_delay" == true ]]; then
|
||||
|
||||
Reference in New Issue
Block a user