From 371f61fa0857f8d36ba004754e9158cb247d1172 Mon Sep 17 00:00:00 2001 From: MacRimi Date: Wed, 3 Jun 2026 16:34:20 +0200 Subject: [PATCH] install_proxmenux: clear stale beta_version.txt on every stable install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A user who rode the beta channel and later switched back to stable keeps a leftover beta_version.txt under /usr/local/share/proxmenux/. The `menu` launcher's beta-mode update check (`check_updates_beta`) short-circuits when that file isn't present, but it stays put across stable installs and updates today, so the user keeps seeing the "Beta update available" prompt on top of the legitimate stable one even though they're no longer on the beta channel. Drop the marker on every stable install/update, in both the update path (around the `cp ./version.txt` near the scripts-tree wipe) and the fresh-install path (the symmetric block lower in the file). The comment about which files survive a scripts-tree wipe is updated to no longer mention beta_version.txt, since that's exactly what we're removing. If the user re-opts into the beta program, install_proxmenux_beta re-creates the file — this only clears stale state that the user no longer has any way to update from anyway. Co-Authored-By: Claude Opus 4.7 --- install_proxmenux.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 00526d41..22212201 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -925,11 +925,20 @@ install_normal_version() { cp "./version.txt" "$LOCAL_VERSION_FILE" cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + # A user that previously rode the beta train and then switched back + # to stable would still have a leftover beta_version.txt under + # $BASE_DIR, which makes the `menu` update check (check_updates_beta) + # offer a "Beta update available" prompt on top of the legitimate + # stable one. Clearing the marker on every stable install/update + # keeps the stable install honestly stable — if the user opts into + # the beta program again, the beta installer will recreate the file. + rm -f "$BASE_DIR/beta_version.txt" + # Wipe the scripts tree before copying so any file removed upstream # (renamed, consolidated, deprecated) disappears from the user install. # Only $BASE_DIR/scripts/ is cleared; config.json, cache.json, - # components_status.json, version.txt, beta_version.txt, monitor.db, - # smart/, oci/ and the AppImage live outside this path and are preserved. + # components_status.json, version.txt, monitor.db, smart/, oci/ and + # the AppImage live outside this path and are preserved. rm -rf "$BASE_DIR/scripts" mkdir -p "$BASE_DIR/scripts" cp -r "./scripts/"* "$BASE_DIR/scripts/" @@ -1073,6 +1082,12 @@ install_translation_version() { cp "./version.txt" "$LOCAL_VERSION_FILE" cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + # Clear any leftover beta_version.txt — see the equivalent block + # in the update path above for the rationale (in short: prevents + # the menu from offering a phantom "Beta update available" after a + # user has switched back to the stable channel). + rm -f "$BASE_DIR/beta_version.txt" + mkdir -p "$BASE_DIR/scripts" cp -r "./scripts/"* "$BASE_DIR/scripts/" chmod -R +x "$BASE_DIR/scripts/"