1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/peertube_ynh.git synced 2024-09-03 19:56:29 +02:00

backup config before upgrade

This commit is contained in:
yalh76 2019-06-01 07:13:00 +02:00
parent 1656c79e27
commit 0d951c1e1d

View file

@ -111,6 +111,7 @@ ynh_setup_source "$final_path"
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
ynh_backup_if_checksum_is_different "$final_path/config/production.yaml"
cp ../conf/production.yaml "$final_path/config/production.yaml" cp ../conf/production.yaml "$final_path/config/production.yaml"
ynh_replace_string "__domain__" "$domain" "$final_path/config/production.yaml" ynh_replace_string "__domain__" "$domain" "$final_path/config/production.yaml"
ynh_replace_string "__db_name__" "$app" "$final_path/config/production.yaml" ynh_replace_string "__db_name__" "$app" "$final_path/config/production.yaml"
@ -172,7 +173,6 @@ pushd "$final_path"
yarn install --production --pure-lockfile yarn install --production --pure-lockfile
popd popd
ynh_backup_if_checksum_is_different "$final_path/config/production.yaml"
# Recalculate and store the checksum of the file for the next upgrade. # Recalculate and store the checksum of the file for the next upgrade.
ynh_store_file_checksum "$final_path/config/production.yaml" ynh_store_file_checksum "$final_path/config/production.yaml"