Update 'installer.sh'

This commit is contained in:
b.waal
2019-09-15 17:31:22 +02:00
parent 2201cd39f2
commit 1f50580b2c

View File

@@ -227,15 +227,14 @@ systemctl restart nginx
##-----------------------##
# MySQL Installation #
##-----------------------##
#whiptail --title "Installing MySQL" --infobox "Busy like a bee" 8 45
whiptail --gauge "Installing MySQL" 6 50 0
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 >/dev/null
##------------------------------##
# MySQL_Secure_Installation #
##------------------------------##
whiptail --gauge "Installing MySQL" 6 50 37
whiptail --title "Installing 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')" >/dev/null
mysql -u root -p"$password" -e "DELETE FROM mysql.user WHERE User=''" >/dev/null
mysql -u root -p"$password" -e "DELETE FROM mysql.db WHERE Db='test' OR Db='test\_%'" >/dev/null
@@ -246,13 +245,12 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" >/dev/null
##-----------------------------##
# MySQL Database Creation #
##-----------------------------##
whiptail --gauge "Installing MySQL" 6 50 77
whiptail --title "Installing MySQL" --infobox "Busy like a bee" 8 45
mysql -u root -p"$password" -e "CREATE DATABASE postfixadmin;" >/dev/null
mysql -u root -p"$password" -e "CREATE USER '"postfixadmin"'@'localhost' IDENTIFIED BY '"$password"';" >/dev/null
mysql -u root -p"$password" -e "GRANT ALL ON "postfixadmin".* TO "postfixadmin"@'localhost';" >/dev/null
mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" >/dev/null
whiptail --gauge "Installing MySQL" 6 50 100
sleep 2
##------------------##
# PostfixADMIN #
##------------------##
@@ -499,5 +497,6 @@ systemctl restart nginx mysql postfix postfix@- dovecot fail2ban clamav-daemon c
##------------------##
# Final Update #
##------------------##
apt update
apt upgrade -y
$PKGM update
$PKGM upgrade -y
$PKGM autoremove -y