Update 'installer.sh'

This commit is contained in:
b.waal
2019-09-17 12:50:41 +02:00
parent 26ea4dc812
commit 7d8153a4bd

View File

@@ -48,7 +48,7 @@ fi
PKGA="add-apt-repository"
PKGI="${PKGM} install -y"
whiptail --title "Starting the installer" --infobox "Busy like a bee" 8 45
##-----------------##
# Static-Vars #
##-----------------##
@@ -70,23 +70,23 @@ dhparam=1024
} | whiptail --gauge "Pre-configuring the server..." 6 50 0
hostnamectl set-hostname $domain > $OUTPUT 2>&1
timedatectl set-timezone Europe/Amsterdam >/dev/null
timedatectl set-timezone Europe/Amsterdam > $OUTPUT 2>&1
adduser --system --no-create-home --disabled-password --disabled-login --shell /bin/false --group --home /var/lib/clamav clamav
mkdir -p /var/run/clamav
chown clamav:clamav /var/run/clamav/
chown clamav:clamav /var/run/clamav
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" >/dev/null
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
#if free | awk '/^Swap:/ {exit !$2}'; then
# echo "swap enabled" >/dev/null
#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
##----------------------##
# Pre-Requirements #