Update 'installer.sh'
This commit is contained in:
15
installer.sh
15
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
|
||||
$PKGM update
|
||||
$PKGM upgrade -y
|
||||
$PKGM autoremove -y
|
||||
Reference in New Issue
Block a user