From f83884537cffd1ca56712aada796f585491a5115 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 2 Apr 2020 14:03:13 +0200 Subject: #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. --- installer/opengnsys_installer.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'installer') 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}" -- cgit v1.2.3-18-g5258