Merge pull request #16 from YunoHost-Apps/testing

ynh_add_config
This commit is contained in:
yalh76 2021-03-01 20:53:25 +01:00 committed by GitHub
commit 849063c014
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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..."
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

View file

@ -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