diff --git a/check_process b/check_process index 8b4cff8..afc9dec 100644 --- a/check_process +++ b/check_process @@ -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& diff --git a/scripts/_ynh_add_fpm_config b/scripts/_ynh_add_fpm_config index 9d4dacf..cfe2232 100644 --- a/scripts/_ynh_add_fpm_config +++ b/scripts/_ynh_add_fpm_config @@ -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 } diff --git a/scripts/upgrade b/scripts/upgrade index cac237d..47d9a0c 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #================================================= diff --git a/scripts/upgrade.d/upgrade.15.sh b/scripts/upgrade.d/upgrade.15.sh index 919c6ad..a8c2c1c 100644 --- a/scripts/upgrade.d/upgrade.15.sh +++ b/scripts/upgrade.d/upgrade.15.sh @@ -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" diff --git a/scripts/upgrade.d/upgrade.16.sh b/scripts/upgrade.d/upgrade.16.sh index ec2b0c6..cb0d88a 100755 --- a/scripts/upgrade.d/upgrade.16.sh +++ b/scripts/upgrade.d/upgrade.16.sh @@ -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" diff --git a/scripts/upgrade.d/upgrade.17.sh b/scripts/upgrade.d/upgrade.17.sh index 0cf5c28..35200da 100755 --- a/scripts/upgrade.d/upgrade.17.sh +++ b/scripts/upgrade.d/upgrade.17.sh @@ -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"