From d044923af7b40aae4d18fabfab5696d72ea8480f Mon Sep 17 00:00:00 2001 From: yalh76 Date: Mon, 15 Jun 2020 00:14:51 +0200 Subject: [PATCH] cp: cannot stat '/tmp/tmp.g65lOMQ9Cq/config.production.json': No such file or directory --- scripts/upgrade | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 26f6bc5..310339d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -105,8 +105,11 @@ then # Create a temporary directory tmpdir="$(mktemp -d)" + # Copy the admin saved settings from tmp directory to final path + cp -ar "$final_path/config.production.json" "$tmpdir/config.production.json" + # Backup the content folder to the temp dir - cp -ar "$final_path/content" "$tmpdir" + cp -ar "$final_path/content" "$tmpdir/content" # Remove the app directory securely ynh_secure_remove --file=$final_path @@ -114,10 +117,10 @@ then # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir=$final_path - #Copy the admin saved settings from tmp directory to final path - cp -a "$tmpdir/config.production.json" "$final_path/config.production.json" + # Copy the admin saved settings from tmp directory to final path + cp -ar "$tmpdir/config.production.json" "$final_path/config.production.json" - # copy content folder back to the final_path + # Copy content folder back to the final_path cp -ar "$tmpdir/content" "${final_path}" # Remove the tmp directory securely