From 9f1312d30865082a2d919dbbfe5f0c3e740383e4 Mon Sep 17 00:00:00 2001 From: AlexF Date: Sat, 12 Nov 2022 22:03:49 +0100 Subject: [PATCH] Fix backward upgrade compatibility --- scripts/upgrade | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 968c96d..573fb4f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -207,10 +207,12 @@ ynh_add_nginx_config # Define a function to execute commands with `occ` exec_occ() { - # Backward compatibility to upgrade from NC14 or older version - if [ $current_major_version = "last" ] || [ $current_major_version -ge 15 ] + # Backward compatibility to upgrade from older versions + if [ $current_major_version = "last" ] || [ $current_major_version -ge 20 ] then NEXTCLOUD_PHP_VERSION=$phpversion + elif [ $current_major_version -ge 15 ] + NEXTCLOUD_PHP_VERSION="7.4" else NEXTCLOUD_PHP_VERSION="7.0" fi