From bd92d107a23c7936d18c3d8d747623d0ea17c2ec Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 9 May 2022 23:59:53 +0200 Subject: [PATCH] Fix upgrade --- scripts/upgrade | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 07369a7..a5e996b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,11 +53,12 @@ ynh_systemd_action --service_name="$app" --action="stop" --line_match="Stopped" #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# Upgrade from <=0.6.6~ynh1: -if ynh_compare_current_package_version --comparison le --version 0.6.6~ynh1 +# Change to head file +if [ -f "/etc/$app/config.d/server.toml" ] then - ynh_delete_file_checksum --file=/etc/"$app"/config.d/server.toml - ynh_secure_remove --file=/etc/"$app"/config.d/server.toml + ynh_delete_file_checksum --file="/etc/$app/config.d/server.toml" + mv "/etc/$app/config.d/server.toml" "/etc/$app/config.d/server.toml.head" + ynh_store_file_checksum --file="/etc/$app/config.d/server.toml.head" fi #=================================================