From d766fb8ed736db786beb68d6fd7eae66597d1be9 Mon Sep 17 00:00:00 2001 From: darken Date: Tue, 26 May 2026 16:12:00 +0200 Subject: [PATCH] chore: redirect bookworm entry script to default-branch webconfig The deployed bg-update.sh on 2025/bookworm feeders fetches this entry script from the bookworm branch, which currently hardcodes a clone of the bookworm branch and so perpetually reinstalls the old webconfig. Point it at the default-branch webconfig so a single Update Feeder run migrates the feeder onto the channel-aware webconfig; after that this branch is no longer consulted. Downloads to a temp file and runs it rather than eval-piping. --- update-webconfig.sh | 50 +++++++++++++++------------------------------ 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/update-webconfig.sh b/update-webconfig.sh index c87b8f8..9987025 100755 --- a/update-webconfig.sh +++ b/update-webconfig.sh @@ -1,35 +1,19 @@ #!/bin/bash - -set -e -trap 'echo "[ERROR] Error in line $LINENO when executing: $BASH_COMMAND"' ERR - -# in case /var/log is full ... delete some logs -echo test > /var/log/.test 2>/dev/null || rm -f /var/log/*.log - -function aptInstall() { - if ! apt install -y --no-install-recommends --no-install-suggests "$@"; then - apt update - apt install -y --no-install-recommends --no-install-suggests "$@" - fi -} - -aptInstall git - -cd /tmp -updir=/tmp/update-webconfig - -rm -rf $updir -git clone --depth 1 -b bookworm https://github.com/airplanes-live/airplanes-webconfig.git $updir - -cd $updir -bash install.sh dont_reset_config - - +# Legacy 2025/bookworm feeders migrate to the unified webconfig on the default +# branch. This entry point redirects there; after the first upgrade the +# channel-aware updater takes over and this branch is no longer consulted. +set -euo pipefail + +url="https://raw.githubusercontent.com/airplanes-live/airplanes-webconfig/master/update-webconfig.sh" +tmpdir="$(mktemp -d /tmp/airplanes-webconfig-entry.XXXXXX)" +trap 'rm -rf "$tmpdir"' EXIT +entry="$tmpdir/update-webconfig.sh" + +if ! wget -q --timeout=30 --tries=3 -O "$entry" "$url" || [[ ! -s "$entry" ]]; then + echo "[ERROR] failed to fetch $url" >&2 + exit 1 +fi + +export AIRPLANES_WEBCONFIG_BRANCH=master cd /tmp -rm -rf $updir - -echo "8.3.$(date '+%y%m%d')" > /boot/airplanes-version-webconfig - -echo '--------------------------------------------' -echo ' update-webconfig complete. ' -echo '--------------------------------------------' +bash "$entry" "$@"