From 4d0df4a4aacbb4a150496ef30eb924dbdc2e8a6a Mon Sep 17 00:00:00 2001 From: rosbeef andino Date: Fri, 16 Dec 2022 19:02:02 +0000 Subject: [PATCH] Update remove --- scripts/remove | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/remove b/scripts/remove index 69fc9ec..dccf013 100644 --- a/scripts/remove +++ b/scripts/remove @@ -104,7 +104,13 @@ ynh_secure_remove --file="/etc/cron.d/$app" # Remove swap ynh_del_swap +if [ -n "$(grep 'kthreadd' /proc/2/status 2>/dev/null)" ]; then + ynh_del_swap + +else + ynh_script_progression --message="No swap will be deleted as you are inside a container. Please take care of having more than 2,5G memory available..." +fi #================================================= # GENERIC FINALIZATION #=================================================