diff --git a/scripts/upgrade b/scripts/upgrade index 187d204..5187e2f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -58,10 +58,9 @@ ynh_system_user_create --username=$app --home_dir="$final_path" # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -# Remove www file -pushd "$final_path" - ynh_exec_warn_less sudo -u $app rm -rf * -popd +# Void and recreate final_path +ynh_secure_remove --file="$final_path" +ynh_exec_warn_less sudo -u $app mkdir "$final_path" if [ "$upgrade_type" == "UPGRADE_APP" ] then