1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00

[fix] searx breaks /var/cache directory

This commit is contained in:
julienmalik 2015-03-30 15:53:50 +02:00
parent d113469115
commit 409317b39a

View file

@ -20,12 +20,13 @@ sudo apt-get install git build-essential libxslt-dev python-dev python-virtualen
# Check Swap
if [ $(sudo swapon -s | wc -l) = 1 ];
then
# It is NOT possible to setup a swap file on a tmpfs filesystem
mount | grep /tmp | grep tmpfs > /dev/null 2>&1
if [ $? = 1 ];
then
tmp_swap_file=/tmp/searx_swapfile
else
tmp_swap_file=/var/cache/
tmp_swap_file=/var/cache/searx_swapfile
fi
sudo dd if=/dev/zero of=$tmp_swap_file bs=1M count=256
sudo chmod 600 $tmp_swap_file