ynh_add_config

This commit is contained in:
yalh76 2021-02-26 21:40:29 +01:00
parent 6b01041081
commit 33c4e2d639
2 changed files with 2 additions and 16 deletions

View file

@ -131,17 +131,7 @@ ynh_add_systemd_config --others_var="ynh_npm"
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
config="$final_path/config/production.yaml" ynh_add_config --template="../conf/default.yaml" --destination="$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"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -134,11 +134,7 @@ ynh_add_systemd_config --others_var="ynh_npm"
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
config="$final_path/config/production.yaml" ynh_add_config --template="../conf/default.yaml" --destination="$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"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION