From 81fab84040dd833ad1410bc2b95bb8f841c128e7 Mon Sep 17 00:00:00 2001 From: t3chn0m4g3 Date: Tue, 27 Jun 2023 09:53:28 +0000 Subject: [PATCH] add bookworm check to updates while not supported the update script will no longer break if bookworm is found --- update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.sh b/update.sh index 321cb8c2..877d38fd 100755 --- a/update.sh +++ b/update.sh @@ -3,7 +3,7 @@ # Some global vars myCONFIGFILE="/opt/tpot/etc/tpot.yml" myCOMPOSEPATH="/opt/tpot/etc/compose" -myLSB_RELEASE="bullseye" +myLSB_RELEASE=("bullseye" "bookworm") myRED="" myGREEN="" myWHITE="" @@ -91,7 +91,7 @@ local myMASTERVERSION="22.04.0" echo echo "### Checking for Release ID" myRELEASE=$(lsb_release -c | awk '{ print $2 }') -if [ "$myRELEASE" != "$myLSB_RELEASE" ] +if [[ ! " ${myLSB_RELEASE[@]} " =~ " ${myRELEASE} " ]]; then echo "###### Need to upgrade to Debian 11 (Bullseye) first:$myWHITE"" [ $myRED""NOT OK""$myWHITE ]" echo "###### Upgrade may result in complete data loss and should not be run via SSH."