From 59f6f80b1cd73b00ae966f7bb2ec7660f825731f Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Fri, 5 Jun 2020 14:22:30 +0200 Subject: [PATCH] prepare for NC 20 PHP 7.2 required --- nextcloud_update.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nextcloud_update.sh b/nextcloud_update.sh index 5aa73963..daf20361 100644 --- a/nextcloud_update.sh +++ b/nextcloud_update.sh @@ -362,6 +362,20 @@ If you need support, please visit https://shop.hanssonit.se/product/upgrade-php- fi fi +# Check if PHP version is compatible with $NCVERSION +PHP_VER=72 +NC_VER=20 +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