From a272a7970680c81a5e22eb6ee3ece6ad86383b1b Mon Sep 17 00:00:00 2001 From: archipelago Date: Thu, 23 Apr 2026 10:07:53 -0400 Subject: [PATCH] fix(self-update): install reconcile scripts on OTA updates The OTA self-update path only refreshed image-versions.sh, leaving reconcile-containers.sh and container-specs.sh frozen at whatever version was baked into the ISO that originally provisioned the node. Any fix to those scripts (notably the --create-missing flag and the DISK_GB detection fix shipped this round) never reached existing nodes, and on .228 both scripts were outright missing because the node predated their inclusion in the ISO recipe. Install all three helper scripts to /opt/archipelago/scripts/ on every self-update run. Also preserve the legacy copy of image-versions.sh at /opt/archipelago/image-versions.sh for any older backend binaries still looking there first. --- scripts/self-update.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/self-update.sh b/scripts/self-update.sh index aeb3ee27..5549d096 100755 --- a/scripts/self-update.sh +++ b/scripts/self-update.sh @@ -170,10 +170,23 @@ else warn "Frontend build output not found at $BUILT_WEB — skipping" fi -# Update image-versions.sh on the server +# Update helper scripts in /opt/archipelago/scripts/ +# These are canonical home; keep a copy at /opt/archipelago/image-versions.sh +# for backward compatibility with older binaries that still look there. +SCRIPTS_DEST="/opt/archipelago/scripts" +sudo mkdir -p "$SCRIPTS_DEST" +for script in image-versions.sh reconcile-containers.sh container-specs.sh; do + src="$REPO_DIR/scripts/$script" + if [ -f "$src" ]; then + sudo install -m 755 "$src" "$SCRIPTS_DEST/$script" + ok "Updated $script" + else + warn "Missing $src — skipping" + fi +done +# Legacy path for image-versions.sh (older binaries looked here first) if [ -f "$REPO_DIR/scripts/image-versions.sh" ]; then sudo cp "$REPO_DIR/scripts/image-versions.sh" /opt/archipelago/image-versions.sh - ok "Image versions updated" fi # Update systemd service if changed