1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dato_ynh.git synced 2024-09-03 18:16:33 +02:00

Removed the whole complicated checksum section in upgrade script, since ynh_add_config should already handle it, and it creates bugs.

This commit is contained in:
squeak 2021-03-12 07:56:31 +01:00
parent 938c385882
commit 3fc64d8984

View file

@ -129,29 +129,6 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# VERIFY CONFIG FILES CHECKSUMS
#=================================================
ynh_script_progression --message="Verifying config files checksums..." --weight=2
# TODO: not sure this section is doing what it should be doing, to check
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
### And create a backup of this file if the checksum is different. So the file will be backed up if the admin had modified it.
ynh_backup_if_checksum_is_different --file="$final_path/config/public.js"
ynh_backup_if_checksum_is_different --file="$final_path/config/private.js"
# ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/CONFIG_FILE"
# Recalculate and store the checksum of the config files for the next upgrade.
ynh_store_file_checksum --file="$final_path/config/public.js"
ynh_store_file_checksum --file="$final_path/config/private.js"
if [[ $autosynchronize == true ]]; then
ynh_backup_if_checksum_is_different --file="/opt/couchdb/etc/local.d/$app.ini"
ynh_store_file_checksum --file="/opt/couchdb/etc/local.d/$app.ini"
fi
#=================================================
# GENERIC FINALIZATION
#=================================================