Skip to content

Commit 19d694a

Browse files
author
hestiacp
authored
Updates from official Vesta ubuntu installer
1 parent 1e17546 commit 19d694a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

install/hst-install-ubuntu.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -996,9 +997,10 @@ fi
996997
#----------------------------------------------------------#
997998

998999
if [ "$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
12331235
if [ "$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
12361238
fi
12371239

12381240
# Configuring PostgreSQL host
12391241
if [ "$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
12421244
fi
12431245

0 commit comments

Comments
 (0)