Update 'installer.sh'
This commit is contained in:
26
installer.sh
26
installer.sh
@@ -48,7 +48,7 @@ fi
|
|||||||
|
|
||||||
PKGA="add-apt-repository"
|
PKGA="add-apt-repository"
|
||||||
PKGI="${PKGM} install -y"
|
PKGI="${PKGM} install -y"
|
||||||
whiptail --title "Starting the installer" --infobox "Busy like a bee" 8 45
|
|
||||||
##-----------------##
|
##-----------------##
|
||||||
# Static-Vars #
|
# Static-Vars #
|
||||||
##-----------------##
|
##-----------------##
|
||||||
@@ -70,23 +70,23 @@ dhparam=1024
|
|||||||
} | whiptail --gauge "Pre-configuring the server..." 6 50 0
|
} | whiptail --gauge "Pre-configuring the server..." 6 50 0
|
||||||
|
|
||||||
hostnamectl set-hostname $domain > $OUTPUT 2>&1
|
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
|
adduser --system --no-create-home --disabled-password --disabled-login --shell /bin/false --group --home /var/lib/clamav clamav
|
||||||
mkdir -p /var/run/clamav
|
mkdir -p /var/run/clamav
|
||||||
chown clamav:clamav /var/run/clamav/
|
chown clamav:clamav /var/run/clamav
|
||||||
mkdir -p /etc/nginx
|
mkdir -p /etc/nginx
|
||||||
mkdir -p /var/www/"$domain"/html
|
mkdir -p /var/www/"$domain"/html
|
||||||
chmod -R 755 /var/www
|
chmod -R 755 /var/www
|
||||||
if free | awk '/^Swap:/ {exit !$2}'; then
|
#if free | awk '/^Swap:/ {exit !$2}'; then
|
||||||
echo "swap enabled" >/dev/null
|
# echo "swap enabled" >/dev/null
|
||||||
else
|
#else
|
||||||
fallocate -l 3G /swapfile
|
# fallocate -l 3G /swapfile
|
||||||
chmod 600 /swapfile
|
# chmod 600 /swapfile
|
||||||
mkswap /swapfile
|
# mkswap /swapfile
|
||||||
swapon /swapfile
|
# swapon /swapfile
|
||||||
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
|
# echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
|
||||||
fi
|
#fi
|
||||||
sed -i 's/#/vm.swappiness=40/g' /etc/sysctl.conf
|
#sed -i 's/#/vm.swappiness=40/g' /etc/sysctl.conf
|
||||||
|
|
||||||
##----------------------##
|
##----------------------##
|
||||||
# Pre-Requirements #
|
# Pre-Requirements #
|
||||||
|
|||||||
Reference in New Issue
Block a user