From 35e2af54f73d0e8b8e885789174a59bfe9610e56 Mon Sep 17 00:00:00 2001 From: Eduardo Mozart de Oliveira <2974895+eduardomozart@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:08:30 -0300 Subject: [PATCH] Apply tzinfo before restarting MySQL service (#13) --- 2-install-guacamole.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/2-install-guacamole.sh b/2-install-guacamole.sh index d070eaf..fc0d393 100644 --- a/2-install-guacamole.sh +++ b/2-install-guacamole.sh @@ -344,21 +344,6 @@ echo # Set MySQL password export MYSQL_PWD=${MYSQL_ROOT_PWD} -# Restart MySQL service -if [ "${INSTALL_MYSQL}" = true ]; then - echo -e "${GREY}Restarting MySQL service & enable at boot..." - # Set MySQl to start at boot - systemctl enable mysql - systemctl restart mysql - if [ $? -ne 0 ]; then - echo -e "${LRED}Failed${GREY}" 1>&2 - exit 1 - else - echo -e "${LGREEN}OK${GREY}" - echo - fi -fi - # Default locations of MySQL config files for x in /etc/mysql/mariadb.conf.d/50-server.cnf \ /etc/mysql/mysql.conf.d/mysqld.cnf \ @@ -401,6 +386,21 @@ else echo fi +# Restart MySQL service +if [ "${INSTALL_MYSQL}" = true ]; then + echo -e "${GREY}Restarting MySQL service & enable at boot..." + # Set MySQl to start at boot + systemctl enable mysql + systemctl restart mysql + if [ $? -ne 0 ]; then + echo -e "${LRED}Failed${GREY}" 1>&2 + exit 1 + else + echo -e "${LGREEN}OK${GREY}" + echo + fi +fi + # Create ${GUAC_DB} and grant ${GUAC_USER} permissions to it # SQL code GUAC_USERHost="localhost"