Fix removing swap

This commit is contained in:
Maniack Crudelis 2019-06-20 12:35:32 +02:00
parent 5e401923d5
commit 7da1c39137

View file

@ -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"