Update 6_server-start.sh

This commit is contained in:
bashermens
2026-01-10 22:38:50 +01:00
committed by GitHub
parent de0b739752
commit 558e5f0c65

View File

@@ -66,37 +66,43 @@ start_tmux_session() {
}
##########################################################################################
# Run services
# Prepare commands
##########################################################################################
# Start authserver via acore.sh for auto-restart
# Authserver via acore.sh for auto-restart
AUTH_CMD="${ROOT}/_server/azerothcore/acore.sh run-authserver"
start_tmux_session "$AUTHSERVER_SESSION" "$AUTH_CMD"
# Start worldserver
# Worldserver
if [[ $DEBUG_MODE -eq 1 ]]; then
# Run GDB directly in current terminal (no tmux) and with RelWithDebInfo or Debug build
# via GDB with RelWithDebInfo or Debug build
echo "DEBUG MODE: Running worldserver under GDB"
cd "$ROOT/_server/azerothcore/env/dist/bin" || exit 1
gdb -ex 'set logging file '"$GDB_LOG" \
-ex 'set logging enabled on' \
-ex 'set pagination off' \
-ex 'set confirm off' \
-ex 'run -c ../etc/worldserver.conf' \
-ex 'bt full' \
-ex 'info threads' \
-ex 'thread apply all bt full' \
--args ./worldserver
WORLD_CMD="cd $ROOT/_server/azerothcore/env/dist/bin && \
gdb -ex \"set logging file $GDB_LOG\" \
-ex \"set logging enabled on\" \
-ex \"set pagination off\" \
-ex \"set confirm off\" \
-ex \"run -c ../etc/worldserver.conf\" \
-ex \"bt full\" \
-ex \"info threads\" \
-ex \"thread apply all bt full\" \
-ex \"quit\" \
--args ./worldserver"
else
# via acore.sh for auto-restart
WORLD_CMD="$ROOT/_server/azerothcore/acore.sh run-worldserver"
start_tmux_session "$WORLDSERVER_SESSION" "$WORLD_CMD"
fi
##########################################################################################
# show menu
# Start servers
##########################################################################################
source "${ROOT}/script/menu.sh"
start_tmux_session "$AUTHSERVER_SESSION" "$AUTH_CMD"
start_tmux_session "$WORLDSERVER_SESSION" "$WORLD_CMD"
##########################################################################################
# Optional: show menu if exists
##########################################################################################
if [[ -f "${ROOT}/script/menu.sh" ]]; then
source "${ROOT}/script/menu.sh"
fi