@@ -973,8 +973,9 @@ if [ "$mysql" = 'yes' ]; then
973973 check_result $? " mysql start failed"
974974
975975 # Securing MySQL/MariaDB installation
976- mysqladmin -u root password $vpass
977- echo -e " [client]\npassword='$vpass '\n" > /root/.my.cnf
976+ mpass=$( gen_pass)
977+ mysqladmin -u root password $mpass
978+ echo -e " [client]\npassword='$mpass '\n" > /root/.my.cnf
978979 chmod 600 /root/.my.cnf
979980 mysql -e " DELETE FROM mysql.user WHERE User=''"
980981 mysql -e " DROP DATABASE test" > /dev/null 2>&1
996997# ----------------------------------------------------------#
997998
998999if [ " $postgresql " = ' yes' ]; then
1000+ ppass=$( gen_pass)
9991001 cp -f $hestiacp /postgresql/pg_hba.conf /etc/postgresql/* /main/
10001002 service postgresql restart
1001- sudo -u postgres psql -c " ALTER USER postgres WITH PASSWORD '$vpass '"
1003+ sudo -u postgres psql -c " ALTER USER postgres WITH PASSWORD '$ppass '"
10021004
10031005 # Configuring phpPgAdmin
10041006 if [ " $apache " = ' yes' ]; then
@@ -1231,13 +1233,13 @@ fi
12311233
12321234# Configuring MySQL/MariaDB host
12331235if [ " $mysql " = ' yes' ]; then
1234- $HESTIA /bin/v-add-database-host mysql localhost root $vpass
1236+ $HESTIA /bin/v-add-database-host mysql localhost root $mpass
12351237 $HESTIA /bin/v-add-database admin default default $( gen_pass) mysql
12361238fi
12371239
12381240# Configuring PostgreSQL host
12391241if [ " $postgresql " = ' yes' ]; then
1240- $HESTIA /bin/v-add-database-host pgsql localhost postgres $vpass
1242+ $HESTIA /bin/v-add-database-host pgsql localhost postgres $ppass
12411243 $HESTIA /bin/v-add-database admin db db $( gen_pass) pgsql
12421244fi
12431245
0 commit comments