From 023c0893541c5a9caaca250fc3c2d02d291ec26d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 11 Dec 2020 14:03:35 +0100 Subject: [PATCH] Update upgrade --- scripts/upgrade | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 0456b5e..52bbebe 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -81,7 +81,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." - if [ -z "$final_path/config/config.ini.php" ]; then + if [[ ! -f "$final_path/config/config.ini.php" ]]; then ynh_setup_source --dest_dir="$final_path" else # Create a temporary directory @@ -124,7 +124,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=low --footprint=medium --package="$extra_php_dependencies" -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC UPGRADE @@ -135,7 +134,7 @@ ynh_script_progression --message="Installating composer and dependencies..." ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" -if [ -z "$final_path/config/config.ini.php" ]; then +if [[ -f "$final_path/config/config.ini.php" ]]; then cd "$final_path" ynh_exec_as $app ./console core:update fi