diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2020-04-02 14:03:13 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2020-04-02 15:15:08 +0200 |
commit | f83884537cffd1ca56712aada796f585491a5115 (patch) | |
tree | 69fa93ef8774bbfd55d40f488512830a404caad5 /installer | |
parent | 930563ce0d47dfb80b8298df883030bd3694198b (diff) |
#941 Restore mysql service in installer
This fixes commit 930563c: the installation script tries to change
MySQL root password without previously starting MySQL.
This commit restores the code that enables and restart MySQL to its
previous position, before changing the password, and adds a new restart
MySQL command.
Diffstat (limited to 'installer')
-rwxr-xr-x | installer/opengnsys_installer.sh | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 529f4d43..dcc02270 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1745,6 +1745,15 @@ INSTVERSION=$(jq -r '.version' $INSTALL_TARGET/doc/VERSION.json) # Instalar base de datos de OpenGnsys Admin. isInArray notinstalled "mysql-server" || isInArray notinstalled "mariadb-server" if [ $? -eq 0 ]; then + # Enable database manager (MySQL, if missing, MariaDB). + service=$MYSQLSERV + $ENABLESERVICE + if [ $? != 0 ]; then + service=$MARIADBSERV + $ENABLESERVICE + fi + # Start database manager. + $STARTSERVICE # Asignar clave del usuario "root". mysqlSetRootPassword "${MYSQL_ROOT_PASSWORD}" else @@ -1754,14 +1763,7 @@ fi # Copy MySQL configuration template cp $WORKDIR/opengnsys/server/etc/mysqld-og.cnf $MYSQLCFGDIR 2>/dev/null -# Enable database manager (MySQL, if missing, MariaDB). -service=$MYSQLSERV -$ENABLESERVICE -if [ $? != 0 ]; then - service=$MARIADBSERV - $ENABLESERVICE -fi -# Activar gestor de base de datos. +# Restart database manager. $STARTSERVICE mysqlTestConnection "${MYSQL_ROOT_PASSWORD}" |