From 33c4e2d639a817afc673a53034813a832e3375e2 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Fri, 26 Feb 2021 21:40:29 +0100 Subject: [PATCH] ynh_add_config --- scripts/install | 12 +----------- scripts/upgrade | 6 +----- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/scripts/install b/scripts/install index dfd8419..4533550 100644 --- a/scripts/install +++ b/scripts/install @@ -131,17 +131,7 @@ ynh_add_systemd_config --others_var="ynh_npm" #================================================= ynh_script_progression --message="Modifying a config file..." -config="$final_path/config/production.yaml" -cp -f ../conf/default.yaml "$config" -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$config" - -#================================================= -# STORE THE CONFIG FILE CHECKSUM -#================================================= -ynh_script_progression --message="Storing the config file checksum..." - -# Calculate and store the config file checksum into the app settings -ynh_store_file_checksum --file="$config" +ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 1f9e82d..3f3a321 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -134,11 +134,7 @@ ynh_add_systemd_config --others_var="ynh_npm" #================================================= ynh_script_progression --message="Modifying a config file..." -config="$final_path/config/production.yaml" -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" +ynh_add_config --template="../conf/default.yaml" --destination="$final_path/config/production.yaml" #================================================= # GENERIC FINALIZATION