From 4dba70af6a7fbe31021d45f1c62466db2b8744d6 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Holcroft Date: Fri, 27 Oct 2017 21:19:47 +0200 Subject: [PATCH] Backup config file before replacing it --- scripts/upgrade | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9176f97..b8e3934 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,6 +126,14 @@ ynh_add_fpm_config #================================================= # SPECIFIC UPGRADE +#================================================= + +#================================================= +# STORE THE CHECKSUM OF THE CONFIG FILE +#================================================= +# Verify the checksum and backup the file if it's different +ynh_backup_if_checksum_is_different "$config" + #================================================= # Create config.php #================================================= @@ -152,8 +160,6 @@ cp ../img/logo.png "$final_path/images" # STORE THE CHECKSUM OF THE CONFIG FILE #================================================= -# Verify the checksum and backup the file if it's different -ynh_backup_if_checksum_is_different "$config" # Recalculate and store the config file checksum into the app settings ynh_store_file_checksum "$config"