From 46147b66270af492be1b9913be5962d384ecb359 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 8 Jun 2021 22:01:50 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 4dc40a3..0e9d599 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -68,20 +68,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 - # Create a temporary directory - tmpdir="$(mktemp -d)" - cp -a "$final_path/configuration.ini" "$tmpdir/configuration.ini" - cp -a "$final_path/pages" "$tmpdir/pages" - - 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/configuration.ini" - - # Copy the admin saved settings from tmp directory to final config path - cp -a "$tmpdir/configuration.ini" "$final_path/configuration.ini" - cp -a "$tmpdir/pages" "$final_path/pages" - # Remove the tmp directory securely - ynh_secure_remove --file="$tmpdir" + ynh_setup_source --dest_dir="$final_path" --keep="$final_path/pages $final_path/configuration.ini" fi chmod 750 "$final_path"