Updated menu
This commit is contained in:
25
installer.sh
25
installer.sh
@@ -31,7 +31,7 @@ if (whiptail --title "Ubuntu 18.04 Mail Server" --yesno "Do you want to install
|
||||
exit
|
||||
fi
|
||||
password=$(whiptail --nocancel --passwordbox "Please enter your password" 8 78 --title "Statics dialog" 3>&1 1>&2 2>&3)
|
||||
domain=$(whiptail --nocancel --inputbox "Enter the domain" 8 78 --title "Statics dialog" 3>&1 1>&2 2>&3)
|
||||
domain=$(whiptail --nocancel --inputbox "Enter the Domain without WWW" 8 78 --title "Statics dialog" 3>&1 1>&2 2>&3)
|
||||
email=$(whiptail --nocancel --inputbox "Enter the E-mail" 8 78 --title "Statics dialog" 3>&1 1>&2 2>&3)
|
||||
elif [ $IMODE = l ]; then
|
||||
echo "Ubuntu 18.04 Mailserver installatie script."
|
||||
@@ -45,7 +45,7 @@ fi
|
||||
|
||||
PKGA="add-apt-repository"
|
||||
PKGI="${PKGM} install -y"
|
||||
|
||||
whiptail --title "Starting the installer" --infobox "Busy like a bee" 8 45
|
||||
##-----------------##
|
||||
# Static-Vars #
|
||||
##-----------------##
|
||||
@@ -61,14 +61,15 @@ dhparam=1024
|
||||
##----------------##
|
||||
# Pre-Config #
|
||||
##----------------##
|
||||
hostnamectl set-hostname $domain
|
||||
apt update
|
||||
apt install software-properties-common -y
|
||||
add-apt-repository universe -y
|
||||
add-apt-repository ppa:ondrej/php -y
|
||||
apt upgrade -y
|
||||
apt autoremove -y
|
||||
timedatectl set-timezone Europe/Amsterdam
|
||||
whiptail --title "Configuring the system" --infobox "Busy like a bee" 8 45
|
||||
hostnamectl set-hostname $domain >/dev/null
|
||||
$PKGM update
|
||||
$PKGI software-properties-common
|
||||
$PKGA universe -y
|
||||
$PKGA ppa:ondrej/php -y
|
||||
$PKGM upgrade -y
|
||||
$PKGM autoremove -y
|
||||
timedatectl set-timezone Europe/Amsterdam >/dev/null
|
||||
mkdir -p /etc/nginx
|
||||
mkdir -p /var/www/"$domain"/html
|
||||
chmod -R 755 /var/www
|
||||
@@ -86,7 +87,7 @@ sed -i 's/#/vm.swappiness=40/g' /etc/sysctl.conf
|
||||
##-------------##
|
||||
# Debloat #
|
||||
##-------------##
|
||||
apt autoremove --purge lxcfs lxd lxd-client geoip-database snapd -y
|
||||
$PKGM remove --purge lxcfs lxd lxd-client geoip-database snapd -y
|
||||
|
||||
##-----------------------##
|
||||
# Html Folder Perms #
|
||||
@@ -96,7 +97,7 @@ chown -R www-data:www-data /var/www/"$domain"/html
|
||||
##-----------##
|
||||
# NGINX #
|
||||
##-----------##
|
||||
apt install -y nginx
|
||||
$PKGI nginx
|
||||
wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-Web/raw/branch/master/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf
|
||||
|
||||
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||
|
||||
Reference in New Issue
Block a user