From 61d06b9dd9fa00cb6edb4a2c7d7d9564400e4ea8 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Sat, 26 Nov 2022 16:46:42 +0100 Subject: [PATCH] remove swap file --- scripts/remove | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/remove b/scripts/remove index e947c2a..1554df4 100755 --- a/scripts/remove +++ b/scripts/remove @@ -64,6 +64,16 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" + +#================================================= +# REMOVE ADDITIONNAL SWAP +#================================================= +#In case install or upgrade went wrong, remove script is launched, so we need to ensure additional swap is deleted +if [ -e /swap_$app ]; then + ynh_script_progression --message="Remove additionnal swap..." --weight=2 + ynh_del_swap +fi + #================================================= # REMOVE NGINX CONFIGURATION #=================================================