diff --git a/scripts/upgrade b/scripts/upgrade index 2cd21207..d77511da 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -158,6 +158,7 @@ ynh_install_composer --phpversion="7.2" --workdir="$final_path" #================================================= config="$final_path/.env" +ynh_backup_if_checksum_is_different --file="$config" cp ../conf/.env "$config" ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$config" @@ -168,6 +169,9 @@ ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --t ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$config" ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$config" +# Recalculate and store the checksum of the file for the next upgrade. +ynh_store_file_checksum --file="$config" + #================================================= # DEPLOYMENT #================================================= @@ -183,15 +187,6 @@ pushd "$final_path" php7.2 artisan horizon:purge popd -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= - -ynh_backup_if_checksum_is_different --file="$config" - -# Recalculate and store the checksum of the file for the next upgrade. -ynh_store_file_checksum --file="$config" - #================================================= # SETUP SYSTEMD #=================================================