From de2170f49ebf2f26231963f3cf8a155c068608cc Mon Sep 17 00:00:00 2001 From: Kay0u Date: Thu, 28 Jan 2021 01:24:53 +0100 Subject: [PATCH] swapoff before reset --- lib/lxc.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/lxc.sh b/lib/lxc.sh index 3a80b5e..8c5f536 100644 --- a/lib/lxc.sh +++ b/lib/lxc.sh @@ -101,6 +101,7 @@ LXC_STOP () { LXC_RESET () { timeout 30 lxc stop --timeout 15 $LXC_NAME --force 2>/dev/null + swapoff $(cat /proc/swaps | grep "ynh-appci-buster-amd64-stable-test/rootfs/swap_") 2>/dev/null lxc delete $LXC_NAME --force 2>/dev/null }