From ff0a461eb9a5e7799cec4a7586fb996f81ec75e1 Mon Sep 17 00:00:00 2001 From: Beudbeud Date: Tue, 8 Sep 2015 23:39:36 +0200 Subject: [PATCH] [fix] swapoff --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index a428680..add44f3 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index a494ab0..cb2ea7d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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