From 74dc992fce0b45e433151bfb914d78f78a589816 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Tue, 27 Apr 2021 22:56:03 +0200 Subject: [PATCH] Fix upgrade steps --- check_process | 4 ---- scripts/upgrade | 10 +--------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/check_process b/check_process index 4046c3d..6d0f1f5 100644 --- a/check_process +++ b/check_process @@ -28,8 +28,6 @@ upgrade=1 from_commit=cba843be0d7e00d7d7290f0d0da95807711a96d4 # 1.1.0~ynh1 upgrade=1 from_commit=5780e424cf3217bf9d25e5b24beb51f52b6b777e - # 1.1.0~ynh1 - upgrade=1 from_commit=5780e424cf3217bf9d25e5b24beb51f52b6b777e backup_restore=1 multi_instance=1 port_already_use=0 @@ -52,5 +50,3 @@ Notification=all name=1.0.7~ynh1 ; commit=5780e424cf3217bf9d25e5b24beb51f52b6b777e name=1.1.0~ynh1 - ; commit=5780e424cf3217bf9d25e5b24beb51f52b6b777e - name=1.1.0~ynh1 diff --git a/scripts/upgrade b/scripts/upgrade index f87603d..1f09fe5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -148,9 +148,7 @@ if [ -z "$datadir" ]; then chmod -R o-rwx "$datadir" chown -R $app:$app "$datadir" - if [[ -d "$final_path/$app/uploads/" ]]; then - rsync -a $final_path/$app/uploads/ $datadir/uploads/ - fi + rsync -a $final_path/$app/uploads/ $datadir/uploads/ config="$final_path/$app/config/prod.secret.exs" @@ -181,9 +179,6 @@ then # Backup the config file in the temp dir cp -af "$final_path/$app/config/prod.secret.exs" "$tmpdir/prod.secret.exs" - # Backup upload dir - rsync -a "$final_path/$app/uploads" "$tmpdir/." - # Remove the app directory securely ynh_secure_remove --file="$final_path/$app" @@ -193,9 +188,6 @@ then # Restore the config file cp -af "$tmpdir/prod.secret.exs" "$final_path/$app/config/prod.secret.exs" - # Restore upload dir - rsync -a "$tmpdir/uploads" "$final_path/$app/." - # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" fi