From 7da1c39137e2c3e6e46e62af47397963daf6b352 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Thu, 20 Jun 2019 12:35:32 +0200 Subject: [PATCH] Fix removing swap --- sub_scripts/launcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sub_scripts/launcher.sh b/sub_scripts/launcher.sh index bb2741a..44b902c 100755 --- a/sub_scripts/launcher.sh +++ b/sub_scripts/launcher.sh @@ -77,7 +77,7 @@ create_temp_backup () { # Remove swap files to avoid killing the CI with huge snapshots. local swap_file="/var/lib/lxc/$lxc_name/rootfs/swap_$ynh_app_id" - if [ -e "$swap_file" ] + if sudo test -e "$swap_file" then sudo swapoff "$swap_file" sudo rm "$swap_file"