diff --git a/scripts/upgrade b/scripts/upgrade index f3f5e10..b519a18 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,8 +102,11 @@ then tmpdir="$(mktemp -d)" # Backup the config file in the temp dir - cp -a "$final_path/config/local-production.json" "$tmpdir/local-production.json" cp -a "$final_path/config/production.yaml" "$tmpdir/production.yaml" + if [ -s "$final_path/config/local-production.json" ] + then + cp -a "$final_path/config/local-production.json" "$tmpdir/local-production.json" + fi # Remove the app directory securely ynh_secure_remove --file="$final_path"