[fix] swapoff

This commit is contained in:
Beudbeud 2015-09-08 23:39:36 +02:00
parent 1c53edb720
commit ff0a461eb9
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ sudo virtualenv $final_path
sudo bash -c "source $final_path/bin/activate && pip install -r $final_path/requirements.txt"
# Disable swapfile
if [[ -z "$tmp_swap_file" ]];
if [[ -v "$tmp_swap_file" ]];
then
sudo swapoff $tmp_swap_file
sudo rm -f $tmp_swap_file

View File

@ -33,7 +33,7 @@ sudo cp -r ../sources/* $final_path
sudo bash -c "source $final_path/bin/activate && pip install -r $final_path/requirements.txt --upgrade"
# Disable swapfile
if [[ -z "$tmp_swap_file" ]];
if [[ -v "$tmp_swap_file" ]];
then
sudo swapoff $tmp_swap_file
sudo rm -f $tmp_swap_file