Update 'installer.sh'

This commit is contained in:
b.waal
2019-09-12 15:17:22 +02:00
parent 792d141896
commit 2ffc96fca5

View File

@@ -42,6 +42,16 @@ timedatectl set-timezone Europe/Amsterdam
mkdir -p /etc/nginx
mkdir -p /var/www/"$domain"/html
chmod -R 755 /var/www
if free | awk '/^Swap:/ {exit !$2}'; then
echo "swap enabled"
else
fallocate -l 3G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
fi
sed -i 's/#/vm.swappiness=40/g' /etc/sysctl.conf
##-------------##
# Debloat #