diff --git a/scripts/upgrade b/scripts/upgrade index 03e870e..86ba36d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -126,8 +126,9 @@ then # Create a temporary directory tmpdir="$(mktemp -d)" - # Backup the config file in the temp dir + # Backup the config file and local plugins in the temp dir cp -a "$final_path/config/config.json" "$tmpdir/config.json" + cp -ar "$final_path/plugins" "$tmpdir/plugins" # Remove the app directory securely ynh_secure_remove --file="$final_path" @@ -138,8 +139,9 @@ then ynh_setup_source --dest_dir="$final_path" --source_id="$architecture" fi - # Copy the admin saved settings from tmp directory to final path + # Copy the admin saved settings and plugins from tmp directory to final path cp -a "$tmpdir/config.json" "$final_path/config/config.json" + cp -ar --no-clobber "$tmpdir/plugins" "$final_path/" # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir"