From cc4e6a0228b28381e1a3e16a56b04ca281640606 Mon Sep 17 00:00:00 2001 From: abeudin Date: Tue, 3 Mar 2015 13:18:58 +0100 Subject: [PATCH] Update install --- scripts/install | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 25326b5..723955c 100644 --- a/scripts/install +++ b/scripts/install @@ -18,9 +18,15 @@ sudo yunohost app setting searx is_public -v $is_public sudo apt-get install git build-essential libxslt-dev python-dev python-virtualenv python-pybabel zlib1g-dev uwsgi uwsgi-plugin-python python-lxml -y # Check Swap -tmp_swap_file=/tmp/searx_swapfile if [ $(sudo swapon -s | wc -l) = 1 ]; then + mount | grep /tmp | grep tmpfs > /dev/null 2>&1 + if [ $? = 1 ]; + then + tmp_swap_file=/tmp/searx_swapfile + else + tmp_swap_file=/var/cache/ + fi sudo dd if=/dev/zero of=$tmp_swap_file bs=1M count=256 sudo chmod 600 $tmp_swap_file sudo mkswap $tmp_swap_file