From 3e1531717a12bcb96b60f9369b42d1cf3b463b83 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Aug 2022 18:59:22 +0200 Subject: [PATCH] set relative path for --keep opt --- scripts/upgrade | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 32f4f92..6128555 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -84,23 +84,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - - # Create a temporary directory - tmpdir="$(mktemp -d)" - - # Backup the config file in the temp dir - cp -a "$final_path/config.json" "$tmpdir/config.json" - - # Remove the app directory securely - ynh_secure_remove --file="$final_path" # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/config.json" - # Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/config.json" "$final_path/config.json" - - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + ynh_setup_source --dest_dir="$final_path" #--keep="config.json" fi chmod 750 "$final_path"