From 3a540d12b21fb9ad443ee24913c419a21b74b2a2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 23 Nov 2021 22:57:36 +0100 Subject: [PATCH] Fix --- manifest.json | 2 +- scripts/upgrade | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index db61d79..dc5446a 100644 --- a/manifest.json +++ b/manifest.json @@ -26,7 +26,7 @@ "multi_instance": false, "services": [ "nginx", - "php8.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/scripts/upgrade b/scripts/upgrade index 1255a2a..dba384e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -61,8 +61,25 @@ if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 + cp -a "$final_path/.env " "$tmpdir/.env " + cp -a "$final_path/public/uploads" "$tmpdir/public/uploads" + cp -a "$final_path/storage/uploads" "$tmpdir/storage/uploads" + # 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" + + cp -a "$tmpdir/.env " "$final_path/.env " + cp -a "$tmpdir/public/uploads" "$final_path/public/uploads" + cp -a "$tmpdir/storage/uploads" "$final_path/storage/uploads" + + # Remove the tmp directory securely + ynh_secure_remove --file="$tmpdir" + # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/.env $final_path/public/uploads $final_path/storage/uploads" + ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/.env $final_path/public/uploads $final_path/storage/uploads" fi chmod 755 $final_path