From 3fc64d8984da9357bdd02758c60ce37f5a6e3393 Mon Sep 17 00:00:00 2001 From: squeak Date: Fri, 12 Mar 2021 07:56:31 +0100 Subject: [PATCH] Removed the whole complicated checksum section in upgrade script, since ynh_add_config should already handle it, and it creates bugs. --- scripts/upgrade | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 9fed4aa..0a6bf84 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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 #=================================================