Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-23 13:31:21 +0300
committerthecalcaholic <6317548+theCalcaholic@users.noreply.github.com>2022-09-23 13:31:21 +0300
commit4b6d3afb91877d58ee8652c8bbddaef99bc3b7ae (patch)
tree962a0e653ba23fb748974e73c49cb2520a997e07 /bin
parentdfbcd43ade2dab10ecb362965a229e3a759d102e (diff)
ncp-update-nc: Prevent upgrade to PHP 8 on docker
Signed-off-by: thecalcaholic <6317548+theCalcaholic@users.noreply.github.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ncp-update-nc10
1 files changed, 8 insertions, 2 deletions
diff --git a/bin/ncp-update-nc b/bin/ncp-update-nc
index 9c380260..8cd85b03 100755
--- a/bin/ncp-update-nc
+++ b/bin/ncp-update-nc
@@ -61,6 +61,13 @@ echo "Current Nextcloud version $CURRENT"
echo "Available Nextcloud version $VER"
is_more_recent_than "${VER}" "${CURRENT}" || { echo "Nothing to update"; exit 1; } # we want `exit 1` so the autoupdate doesn't notify success in this case
+
+if ! is_more_recent_than '25.0.0' "${VER}" && is_more_recent_than "8.1.0" "${PHPVER}.0" && is_docker
+then
+ echo 'You need to upgrade to a later docker image in order to upgrade to Nextcloud 25+'
+ exit 1
+fi
+
# make sure that cron.php is not running and there are no pending jobs
# https://github.com/nextcloud/server/issues/10949
pgrep -cf cron.php &>/dev/null && { pkill -f cron.php; sleep 3; }
@@ -229,8 +236,7 @@ fi
rm -rf /var/www/nextcloud/apps/previewgenerator
ln -snf "${NCPREV}" /var/www/nextcloud/apps/previewgenerator
-
-if ! is_more_recent_than "24.0.0" "${NCVER}" && is_more_recent_than "8.1.0" "${PHPVER}.0"
+if ! is_docker && ! is_more_recent_than "24.0.0" "${NCVER}" && is_more_recent_than "8.1.0" "${PHPVER}.0"
then
(
echo "Upgrading PHP..."