From 55576815acb4d40fc1fa335ccd8ef17680dadc97 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Sat, 1 Jun 2019 07:18:36 +0200 Subject: [PATCH] backup configuration before upgrade --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 523da73..e9855f8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,6 +139,7 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # MODIFY A CONFIG FILE #================================================= +ynh_backup_if_checksum_is_different --file="$final_path/config.yml" cp -f ../conf/config.sample.yml "$final_path/config.yml" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$final_path/config.yml" @@ -149,7 +150,6 @@ ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --ta # STORE THE CONFIG FILE CHECKSUM #================================================= -ynh_backup_if_checksum_is_different --file="$final_path/config.yml" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="$final_path/config.yml"