diff options
author | thecalcaholic <6317548+theCalcaholic@users.noreply.github.com> | 2022-09-23 13:31:21 +0300 |
---|---|---|
committer | thecalcaholic <6317548+theCalcaholic@users.noreply.github.com> | 2022-09-23 13:31:21 +0300 |
commit | 4b6d3afb91877d58ee8652c8bbddaef99bc3b7ae (patch) | |
tree | 962a0e653ba23fb748974e73c49cb2520a997e07 /bin | |
parent | dfbcd43ade2dab10ecb362965a229e3a759d102e (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-x | bin/ncp-update-nc | 10 |
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..." |