Match the WebUI template by its XML Name element, and count the final sync on rsync's actual exit
The lookup grepped for a quoted container name that appears in no Unraid template, so every offboard reported four WebUIs it could not reconfigure. The final sync counted a share synced whenever Tier 1 was on, ignoring rsync.sh's status entirely.
This commit is contained in:
@@ -707,11 +707,17 @@ reconfigure_webui() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Match <Name>Authelia</Name>, not "Authelia". Unraid writes the container name as bare XML
|
||||
# text, so the quoted form matched nothing in any template on any host — which is why every
|
||||
# offboard ended with four "template not found ... WebUI needs manual reconfiguration"
|
||||
# warnings and left the mirror's auth WebUIs pointing at the owner it had just left.
|
||||
#
|
||||
# xargs -r so an empty first grep does not run the second one against the whole directory.
|
||||
local template
|
||||
template=$(timeout "$SSH_TIMEOUT" ssh -i "$ssh_key" \
|
||||
-o ConnectTimeout="$SSH_TIMEOUT" -o BatchMode=yes root@"$remote_ip" \
|
||||
"grep -rl '<WebUI>' '$TEMPLATES_DIR/' 2>/dev/null | \
|
||||
xargs grep -l '\"$container\"' 2>/dev/null | head -1" 2>/dev/null)
|
||||
xargs -r grep -l '<Name>$container</Name>' 2>/dev/null | head -1" 2>/dev/null)
|
||||
|
||||
if [[ -z "$template" ]]; then
|
||||
warn "$container template not found on $label — WebUI needs manual reconfiguration"
|
||||
|
||||
Reference in New Issue
Block a user