From 7713521f6d44b65fc0bb4428ebc6fa28d5ebe9a4 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Wed, 31 Mar 2021 22:28:10 +0200 Subject: [PATCH] Fix #76 --- scripts/upgrade | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 60da724..fbef93c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -124,6 +124,9 @@ then # Backup the config file in the temp dir cp -a "$final_path/$app/config/prod.secret.exs" "$tmpdir/prod.secret.exs" + + # Backup upload dir + rsync -a "$final_path/uploads" "$tmpdir/." # Remove the app directory securely ynh_secure_remove --file="$final_path/$app" @@ -131,8 +134,11 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path/$app" - #Copy the admin saved settings from tmp directory to final path + # Restore the config file cp -a "$tmpdir/prod.secret.exs" "$final_path/$app/config/prod.secret.exs" + + # Restore upload dir + sync -a "$tmpdir/uploads" "$final_path/." # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir"