Skip to content

Commit

Permalink
ncp-update-nc: Prevent installation of NC >= 24 on debian 10/PHP <= 7.3
Browse files Browse the repository at this point in the history
Signed-off-by: thecalcaholic <[email protected]>
  • Loading branch information
theCalcaholic committed Sep 14, 2022
1 parent 87af74c commit ea7c6aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bin/ncp-update-nc
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ 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 "24.0.0" "${VER}" && is_more_recent_than "7.4.0" "${PHPVER}.0"
then
echo -e "Upgrading to Nextcloud versions > 23 requires the latest debian and PHP versions. Please run \`ncp-dist-upgrade\` and then run the update again."
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; }
Expand Down

0 comments on commit ea7c6aa

Please sign in to comment.