From 1f50580b2cf95ff5b3970498dcf1154bf1fad8d2 Mon Sep 17 00:00:00 2001 From: "b.waal" Date: Sun, 15 Sep 2019 17:31:22 +0200 Subject: [PATCH] Update 'installer.sh' --- installer.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/installer.sh b/installer.sh index 13e8ee4..af5f470 100644 --- a/installer.sh +++ b/installer.sh @@ -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 \ No newline at end of file +$PKGM update +$PKGM upgrade -y +$PKGM autoremove -y \ No newline at end of file