From 9c251d34b58611c417c8431bf44f962b0e65e00f Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Sat, 23 Sep 2023 01:39:46 +0200 Subject: [PATCH] Use ynh_secure_remove --- scripts/upgrade | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 8c6830d..94e197d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,8 +43,9 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app if $(ynh_compare_current_package_version --comparison le --version "2.6.2~ynh4") then + # Purge old root directory's contents ynh_script_progression --message="Removing old files..." --weight=2 - rm -rf $install_dir/{*,.[!.]*} + ynh_secure_remove --file="$install_dir" fi if [[ "$upgrade_type" == "UPGRADE_APP" || $(ynh_compare_current_package_version --comparison le --version "2.6.2~ynh4") ]]; then