1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Merge pull request #623 from YunoHost-Apps/fix-upgrade-25

[fix] Upgrade from 25
This commit is contained in:
eric_G 2023-10-31 07:03:55 +01:00 committed by GitHub
commit 61d7164132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -105,14 +105,17 @@ current_major_version=${current_version%%.*}
# Define a function to execute commands with `occ`
exec_occ() {
# Backward compatibility to upgrade from older versions
if [ $current_major_version = "last" ] || [ $current_major_version -ge 24 ]
if [ $current_major_version = "last" ] || [ $current_major_version -ge 26 ]
then
NEXTCLOUD_PHP_VERSION=$phpversion
elif [ $current_major_version -ge 15 ]
elif [ $current_major_version -ge 25 ]
then
NEXTCLOUD_PHP_VERSION="8.1"
elif [ $current_major_version -ge 18 ]
then
NEXTCLOUD_PHP_VERSION="7.4"
else
NEXTCLOUD_PHP_VERSION="7.0"
NEXTCLOUD_PHP_VERSION="7.1"
fi
(cd "$install_dir" && ynh_exec_as "$app" \
php$NEXTCLOUD_PHP_VERSION --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@")