From 06bde77353e342dac9f11403ad241cfffc3d2434 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Thu, 19 Sep 2024 20:21:22 +0200 Subject: [PATCH 1/2] set variable to printf Signed-off-by: Daniel Hansson --- nextcloud_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index a43c69f59b..eaaed2e68f 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -596,7 +596,7 @@ elif [ -f "$GEOBLOCK_MOD" ] then if download_geoip_mmdb then - print_text_in_color "IGreen" "MaxMind database updated!" + print_text_in_color "$IGreen" "MaxMind database updated!" fi fi From ac8b7cc87827f78ccf901fe64f448342c2e35fba Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Thu, 19 Sep 2024 20:32:09 +0200 Subject: [PATCH 2/2] PHP 8.1 EOL (#2670) Signed-off-by: Daniel Hansson --- nextcloud_update.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index eaaed2e68f..9854c638e0 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -985,6 +985,21 @@ If you need support, please visit https://shop.hanssonit.se/product/upgrade-php- fi fi +# Check if PHP version is compatible with $NCVERSION +# https://github.com/nextcloud/server/issues/29258 +PHP_VER=81 +NC_VER=31 +if [ "${NCVERSION%%.*}" -ge "$NC_VER" ] +then + if [ "$(php -v | head -n 1 | cut -d " " -f 2 | cut -c 1,3)" -lt "$PHP_VER" ] + then +msg_box "Your PHP version isn't compatible with the new version of Nextcloud. Please upgrade your PHP stack and try again. + +If you need support, please visit https://shop.hanssonit.se/product/upgrade-php-version-including-dependencies/" + exit + fi +fi + # Upgrade Nextcloud if ! site_200 "$NCREPO" then