mirror of
https://github.com/hermensbas/azerothcore_installer.git
synced 2026-01-13 00:28:33 +00:00
Update 6_server-start.sh
This commit is contained in:
@@ -9,7 +9,7 @@ export CRASHES_PATH="/tmp/ac/crashes"
|
|||||||
mkdir -p "$LOGS_PATH" "$CRASHES_PATH"
|
mkdir -p "$LOGS_PATH" "$CRASHES_PATH"
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# Sessions
|
# Tmux sessions
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
AUTHSERVER_SESSION="auth-session"
|
AUTHSERVER_SESSION="auth-session"
|
||||||
WORLDSERVER_SESSION="world-session"
|
WORLDSERVER_SESSION="world-session"
|
||||||
@@ -21,11 +21,13 @@ WORLD_LOG="$LOGS_PATH/worldserver_$TIMESTAMP.log"
|
|||||||
WORLD_CRASH_LOG="$CRASHES_PATH/worldserver_gdb_$TIMESTAMP.log"
|
WORLD_CRASH_LOG="$CRASHES_PATH/worldserver_gdb_$TIMESTAMP.log"
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# Determine SERVER_ROOT based on script location (works with aliases)
|
# Determine ROOT_DIR based on script location
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
SERVER_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
|
||||||
RUN_ENGINE="$SERVER_ROOT/_server/azerothcore/apps/startup-scripts/src/run-engine"
|
# Paths to binaries
|
||||||
|
AUTH_BIN="$ROOT_DIR/_server/azerothcore/env/dist/bin/authserver"
|
||||||
|
WORLD_BIN="$ROOT_DIR/_server/azerothcore/env/dist/bin/worldserver"
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
# Check debug toggle
|
# Check debug toggle
|
||||||
@@ -69,23 +71,20 @@ start_tmux_session() {
|
|||||||
# Prepare commands
|
# Prepare commands
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
|
|
||||||
# Authserver always via acore.sh for auto-restart
|
# Authserver binary (normal mode)
|
||||||
AUTH_CMD="${SERVER_ROOT}/acore.sh run-authserver"
|
AUTH_CMD="$AUTH_BIN"
|
||||||
|
|
||||||
|
# Worldserver binary
|
||||||
if [[ $DEBUG_MODE -eq 1 ]]; then
|
if [[ $DEBUG_MODE -eq 1 ]]; then
|
||||||
echo "DEBUG MODE: Running worldserver under GDB"
|
echo "DEBUG MODE: Running worldserver under GDB"
|
||||||
WORLD_CMD="$RUN_ENGINE restart worldserver \
|
WORLD_CMD="gdb -ex 'set logging file $WORLD_CRASH_LOG' \
|
||||||
--server-config ${SERVER_ROOT}/conf/worldserver.conf \
|
-ex 'set logging enabled on' \
|
||||||
--session-manager tmux \
|
-ex 'run' \
|
||||||
--gdb-enabled 1 \
|
-ex 'bt full' \
|
||||||
--logs-path $LOGS_PATH \
|
-ex 'quit' \
|
||||||
--crashes-path $CRASHES_PATH"
|
--args $WORLD_BIN"
|
||||||
else
|
else
|
||||||
WORLD_CMD="$RUN_ENGINE restart worldserver \
|
WORLD_CMD="$WORLD_BIN"
|
||||||
--server-config ${SERVER_ROOT}/conf/worldserver.conf \
|
|
||||||
--session-manager tmux \
|
|
||||||
--logs-path $LOGS_PATH \
|
|
||||||
--crashes-path $CRASHES_PATH"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
@@ -97,6 +96,6 @@ start_tmux_session "$WORLDSERVER_SESSION" "$WORLD_CMD" "$WORLD_LOG"
|
|||||||
##########################################################################################
|
##########################################################################################
|
||||||
# Optional: show menu if exists
|
# Optional: show menu if exists
|
||||||
##########################################################################################
|
##########################################################################################
|
||||||
if [[ -f "${SERVER_ROOT}/script/menu.sh" ]]; then
|
if [[ -f "${ROOT_DIR}/script/menu.sh" ]]; then
|
||||||
source "${SERVER_ROOT}/script/menu.sh"
|
source "${ROOT_DIR}/script/menu.sh"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user