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
|
exit
|
||||||
fi
|
fi
|
||||||
password=$(whiptail --nocancel --passwordbox "Please enter your password" 8 78 --title "Statics dialog" 3>&1 1>&2 2>&3)
|
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)
|
email=$(whiptail --nocancel --inputbox "Enter the E-mail" 8 78 --title "Statics dialog" 3>&1 1>&2 2>&3)
|
||||||
elif [ $IMODE = l ]; then
|
elif [ $IMODE = l ]; then
|
||||||
echo "Ubuntu 18.04 Mailserver installatie script."
|
echo "Ubuntu 18.04 Mailserver installatie script."
|
||||||
@@ -45,7 +45,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 #
|
||||||
##-----------------##
|
##-----------------##
|
||||||
@@ -61,14 +61,15 @@ dhparam=1024
|
|||||||
##----------------##
|
##----------------##
|
||||||
# Pre-Config #
|
# Pre-Config #
|
||||||
##----------------##
|
##----------------##
|
||||||
hostnamectl set-hostname $domain
|
whiptail --title "Configuring the system" --infobox "Busy like a bee" 8 45
|
||||||
apt update
|
hostnamectl set-hostname $domain >/dev/null
|
||||||
apt install software-properties-common -y
|
$PKGM update
|
||||||
add-apt-repository universe -y
|
$PKGI software-properties-common
|
||||||
add-apt-repository ppa:ondrej/php -y
|
$PKGA universe -y
|
||||||
apt upgrade -y
|
$PKGA ppa:ondrej/php -y
|
||||||
apt autoremove -y
|
$PKGM upgrade -y
|
||||||
timedatectl set-timezone Europe/Amsterdam
|
$PKGM autoremove -y
|
||||||
|
timedatectl set-timezone Europe/Amsterdam >/dev/null
|
||||||
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
|
||||||
@@ -86,7 +87,7 @@ sed -i 's/#/vm.swappiness=40/g' /etc/sysctl.conf
|
|||||||
##-------------##
|
##-------------##
|
||||||
# Debloat #
|
# 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 #
|
# Html Folder Perms #
|
||||||
@@ -96,7 +97,7 @@ chown -R www-data:www-data /var/www/"$domain"/html
|
|||||||
##-----------##
|
##-----------##
|
||||||
# NGINX #
|
# 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
|
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"
|
cat <<EOF > /etc/nginx/sites-available/"$domain"
|
||||||
|
|||||||
Reference in New Issue
Block a user