diff --git a/installer.sh b/installer.sh index ca6ae22..e24a604 100644 --- a/installer.sh +++ b/installer.sh @@ -24,7 +24,6 @@ PKGI="${PKGM} install -y" if [ $IMODE = n ]; then TERM=ansi whiptail --title "Ubuntu 18.04 Mail Installer" --infobox "" 8 45 -sleep 3 if (whiptail --title "Ubuntu 18.04 Mail Server" --yesno "Do you want to install a mail server?" 8 78) then echo "" >/dev/null @@ -66,11 +65,8 @@ debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Si ##----------------## # Pre-Config # ##----------------## -{ for ((i = 0 ; i <= 100 ; i+=5)); do sleep 0.2 - echo $i - done -} | whiptail --gauge "Pre-configuring the server..." 6 50 0 - +TERM=ansi whiptail --title "Pre-ConfiguringL" --infobox "Busy like a bee" 8 45 +sleep 2 hostnamectl set-hostname $domain > $OUTPUT 2>&1 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 @@ -98,7 +94,7 @@ $PKGI software-properties-common $PKGA universe -y > $OUTPUT 2>&1 $PKGA ppa:ondrej/php -y > $OUTPUT 2>&1 wget -q -O- https://repo.dovecot.org/DOVECOT-REPO-GPG | sudo apt-key add - -echo "deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/dovecot.list +echo "deb https://repo.dovecot.org/ce-2.3-latest/ubuntu/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/dovecot.list > $OUTPUT 2>&1 $PKGM update $PKGM upgrade -y @@ -246,10 +242,7 @@ systemctl restart nginx ##-----------------------## # MySQL Installation # ##-----------------------## -{ for ((i = 0 ; i <= 100 ; i+=5)); do sleep 0.2 - echo $i - done -} | whiptail --gauge "Installing MySQL..." 6 50 0 +TERM=ansi whiptail --title "Installing MySQL" --infobox "Busy like a bee" 8 45 wget -q -t7 https://git.ictmaatwerk.com/VPS-scripts/Ubuntu-MySQL/raw/branch/master/mysql-8.0.sh -O /tmp/mysql-8.0.sh source /tmp/mysql-8.0.sh @@ -257,10 +250,7 @@ source /tmp/mysql-8.0.sh ##------------------------------## # MySQL_Secure_Installation # ##------------------------------## -{ for ((i = 0 ; i <= 100 ; i+=5)); do sleep 0.2 - echo $i - done -} | whiptail --gauge "Securing MySQL..." 6 50 0 +TERM=ansi whiptail --title "Securing MySQL" --infobox "Busy like a bee" 8 45 mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1')" > $OUTPUT 2>&1 mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User=''" > $OUTPUT 2>&1 @@ -272,10 +262,7 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" > $OUTPUT 2>&1 ##-----------------------------## # MySQL Database Creation # ##-----------------------------## -{ for ((i = 0 ; i <= 100 ; i+=5)); do sleep 0.2 - echo $i - done -} | whiptail --gauge "Creating MySQL Databases..." 6 50 0 +TERM=ansi whiptail --title "Creating MySQL Databases" --infobox "Busy like a bee" 8 45 mysql -u root -p"$password" -e "CREATE DATABASE postfixadmin;" > $OUTPUT 2>&1 mysql -u root -p"$password" -e "CREATE USER '"postfixadmin"'@'localhost' IDENTIFIED BY '"$password"';" > $OUTPUT 2>&1 mysql -u root -p"$password" -e "GRANT ALL ON "postfixadmin".* TO "postfixadmin"@'localhost';" > $OUTPUT 2>&1 @@ -287,10 +274,7 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" > $OUTPUT 2>&1 $PKGI postfix postfix-mysql #$PKGI php${phpver} php${phpver}-zip php${phpver}-fpm php${phpver}-cli php${phpver}-json php${phpver}-mysql php${phpver}-opcache php${phpver}-mbstring php${phpver}-readline #$PKGI libc-client2007e mlock php${phpver}-common php${phpver}-imap -{ for ((i = 0 ; i <= 100 ; i+=5)); do sleep 0.2 - echo $i - done -} | whiptail --gauge "Configuring PostfixAdmin..." 6 50 0 +TERM=ansi whiptail --title "Configuring PostfixAdmin" --infobox "Busy like a bee" 8 45 mkdir -p /var/www/"$domain"/html/postfixadmin/templates_c wget -q -t7 https://git.ictmaatwerk.com/downloads/pfa/postfixadmin-3.1.tar.gz -O /tmp/postfixadmin.tar.gz tar -xf /tmp/postfixadmin.tar.gz -C /var/www/"$domain"/html/postfixadmin --strip-components=1