diff options
Diffstat (limited to 'installer')
-rwxr-xr-x | installer/opengnsys_installer.sh | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 04807ec4..529f4d43 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -1745,17 +1745,6 @@ 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 - # Copiar plantilla de configuraciĆ³n de MySQL. - cp $WORKDIR/opengnsys/server/etc/mysqld-og.cnf $MYSQLCFGDIR 2>/dev/null - # Habilitar gestor de base de datos (MySQL, si falla, MariaDB). - service=$MYSQLSERV - $ENABLESERVICE - if [ $? != 0 ]; then - service=$MARIADBSERV - $ENABLESERVICE - fi - # Activar gestor de base de datos. - $STARTSERVICE # Asignar clave del usuario "root". mysqlSetRootPassword "${MYSQL_ROOT_PASSWORD}" else @@ -1763,6 +1752,18 @@ else mysqlGetRootPassword 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. +$STARTSERVICE + mysqlTestConnection "${MYSQL_ROOT_PASSWORD}" if [ $? -ne 0 ]; then errorAndLog "Error while connection to mysql" |