From d2a92514cb239faf4e8c1edc02560c65a98b86ab Mon Sep 17 00:00:00 2001 From: Viskus <38486602+Viskus@users.noreply.github.com> Date: Thu, 26 Sep 2024 21:00:18 +1000 Subject: [PATCH] Update ac-dashboard-core-installation.md added a wait command for MYSQL so on boot TMUX does not fail to start server --- docs/ac-dashboard-core-installation.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/ac-dashboard-core-installation.md b/docs/ac-dashboard-core-installation.md index 5f58d1804..bf0ba03b9 100644 --- a/docs/ac-dashboard-core-installation.md +++ b/docs/ac-dashboard-core-installation.md @@ -199,6 +199,18 @@ You can automatically create the tmux sessions and execute the `authserver` and ```sh #!/usr/bin/env bash +# ALLOW TMUX TO WAIT FOR MYSQL TO BE READY +# YOU MUST CHANGE THE USER AND PASSWORD TO CORRESPOND WITH YOUR INSTALL + mysql_ready() { + mysqladmin ping --host=127.0.0.1 --user=YOURUSER --password=YOURPASSWORD > /dev/null 2>&1 + } + + while !(mysql_ready) + do + sleep 3 + echo "waiting for mysql ..." + done + # CHANGE THESE WITH THE CORRECT PATHS authserver="/path/to/azerothcore-wotlk/acore.sh run-authserver" worldserver="/path/to/azerothcore-wotlk/acore.sh run-worldserver"