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

Fix upgrade from previous version

This commit is contained in:
Jimmy Monin 2020-02-19 07:11:40 +01:00
parent 463640dcd5
commit 5310fd9f3a
6 changed files with 37 additions and 37 deletions

View file

@ -12,7 +12,7 @@
setup_private=0
setup_public=0
upgrade=1
upgrade=1 from_commit=1cdb9ea1619c6acaaa90bae88b5c4bed5084a2a7
upgrade=1 from_commit=9c57c2f78f3da979d587d708eb9379ffaa41bcfa
backup_restore=1
multi_instance=1
incorrect_path=1
@ -24,6 +24,6 @@
Email=
Notification=none
;;; Upgrade options
; commit=1cdb9ea1619c6acaaa90bae88b5c4bed5084a2a7
name= Fix Debian Stretch dependencies by installing php-apcu, php-mbstring …
; commit=9c57c2f78f3da979d587d708eb9379ffaa41bcfa
name=Do not use too much process for php (#247)
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&

View file

@ -125,4 +125,22 @@ ynh_add_fpm_config () {
ynh_store_file_checksum "$finalphpini"
fi
ynh_systemd_action --service_name=$fpm_service --action=reload
# Clean other php version config files for this app. Used for migration purpose.
if [ -e "/etc/php5/fpm/pool.d/$app.conf" ]
then
ynh_secure_remove --file="/etc/php5/fpm/pool.d/$app.conf"
ynh_systemd_action --service_name=php5-fpm --action=reload
fi
for i in `seq 0 4`
do
if [ "$phpversion" != "7.$i" ]
then
if [ -e "/etc/php/7.$i/fpm/pool.d/$app.conf" ]
then
ynh_secure_remove --file="/etc/php/7.$i/fpm/pool.d/$app.conf"
ynh_systemd_action --service_name=php7.$i-fpm --action=reload
fi
fi
done
}

View file

@ -132,6 +132,16 @@ fi
# Normalize the URL path syntax
path_url=$(ynh_normalize_url_path --path_url=$path_url)
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=7
ynh_install_app_dependencies $pkg_dependencies
ynh_remove_php
ynh_install_php --phpversion="$php_version" --package="$extra_pkg_dependencies"
#=================================================
# STANDARD UPGRADE STEPS
#=================================================
@ -178,16 +188,6 @@ if [ -f /etc/php/$php_version/fpm/conf.d/20-$app.ini ]; then
ynh_secure_remove --file=/etc/php/$php_version/fpm/conf.d/20-$app.ini
fi
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=7
ynh_install_app_dependencies $pkg_dependencies
ynh_remove_php
ynh_install_php --phpversion="$php_version" --package="$extra_pkg_dependencies"
#=================================================
# SPECIFIC UPGRADE
#=================================================

View file

@ -1,7 +1,7 @@
#!/bin/bash
# Last available nextcloud version
next_version="15.0.11"
next_version="16.0.0"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="59cdde8e7a4a15606efc246e37adf6401b0b4a60f33289be8725d675b9c2ae26"
nextcloud_source_sha256="4532f7028b1d9bf060f75ac4fbbde52a59ecd9c9155f3178a038d3cf3609402e"

View file

@ -1,16 +1,7 @@
#!/bin/bash
# Last available nextcloud version
next_version="16.0.5"
next_version="17.0.0"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="8709c64fa776fd731c8e5f1ab25d592a2e690e5e18a81601cccf363795fae551"
# This function will only be executed upon applying the last upgrade referenced above
last_upgrade_operations () {
# Patch nextcloud files only for the last version
cp -a ../sources/patches_last_version/* ../sources/patches
# Execute post-upgrade operations later on
(cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u $app php occ db:add-missing-indices ; sudo -u $app php occ db:convert-filecache-bigint -n) > /tmp/${app}_maintenance.log")
}
nextcloud_source_sha256="6081421b33ecdb3130b2bfb2293a3f4045aeb0b471ee570e675de3d931a142a6"

View file

@ -1,16 +1,7 @@
#!/bin/bash
# Last available nextcloud version
next_version="17.0.0"
next_version="18.0.0"
# Nextcloud tarball checksum sha256
nextcloud_source_sha256="6081421b33ecdb3130b2bfb2293a3f4045aeb0b471ee570e675de3d931a142a6"
# This function will only be executed upon applying the last upgrade referenced above
last_upgrade_operations () {
# Patch nextcloud files only for the last version
cp -a ../sources/patches_last_version/* ../sources/patches
# Execute post-upgrade operations later on
(cd /tmp ; at now + 10 minutes <<< "(cd $final_path ; sudo -u $app php occ db:add-missing-indices ; sudo -u $app php occ db:convert-filecache-bigint -n) > /tmp/${app}_maintenance.log")
}
nextcloud_source_sha256="194095a5586d84040bc455f77b8aa6c80f9a6a6dd713c9aebdad046713d4267b"