From 76c1113cd8f976ab33324f8f661f30430c1480b9 Mon Sep 17 00:00:00 2001 From: Roman Kupriyanov Date: Wed, 21 Jul 2021 02:17:02 +0300 Subject: [PATCH] Add more visibility for DB/Cron upgrades --- scripts/upgrade | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index e387cbc..ef53c90 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -167,24 +167,36 @@ ynh_add_nginx_config #================================================= # PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4 +ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" +# Run Composer +pushd "$final_path" + ynh_exec_as "$app" php$phpversion bin/composer.phar install --no-dev --quiet +popd + #================================================= -# STORE THE CONFIG FILE CHECKSUM +# CRON CONFIGURATION #================================================= +ynh_script_progression --message="Upgrading Cron configuration..." --weight=1 + ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" chown root: "/etc/cron.d/$app" chmod 644 "/etc/cron.d/$app" -# Run Composer +#================================================= +# DATABASE STRUCTURE UPDATE +#================================================= + +ynh_script_progression --message="Upgrading DB structure..." --weight=4 + +# Run DB structure update pushd "$final_path" - ynh_exec_as "$app" php$phpversion bin/composer.phar install --no-dev --quiet - ynh_exec_as "$app" bin/console dbstructure update - #ynh_exec_as "$app" bin/console config system addon ldapauth + ynh_exec_as "$app" bin/console dbstructure update + #ynh_exec_as "$app" bin/console config system addon ldapauth popd #=================================================