Update 6_server-start.sh

This commit is contained in:
bashermens
2026-01-10 20:17:51 +01:00
committed by GitHub
parent 9fa3306079
commit 9bfc7ec2a5

View File

@@ -42,7 +42,9 @@ start_tmux_session() {
local log_file=$3 local log_file=$3
# Create session if it doesn't exist # Create session if it doesn't exist
if ! tmux has-session -t "$session_name" 2>/dev/null; then if tmux has-session -t "$session_name" 2>/dev/null; then
echo "Tmux session '$session_name' already exists."
else
if tmux new-session -d -s "$session_name"; then if tmux new-session -d -s "$session_name"; then
echo "Created tmux session: $session_name" echo "Created tmux session: $session_name"
else else
@@ -54,7 +56,7 @@ start_tmux_session() {
# Export environment variables inside tmux # Export environment variables inside tmux
tmux send-keys -t "$session_name" "export LOGS_PATH=$LOGS_PATH; export CRASHES_PATH=$CRASHES_PATH" C-m tmux send-keys -t "$session_name" "export LOGS_PATH=$LOGS_PATH; export CRASHES_PATH=$CRASHES_PATH" C-m
# Run the command and pipe output to a **new log file** # Run the command and pipe output to a new log file
tmux send-keys -t "$session_name" "$command | tee $log_file" C-m tmux send-keys -t "$session_name" "$command | tee $log_file" C-m
echo "Running '$command' in $session_name, logging to $log_file" echo "Running '$command' in $session_name, logging to $log_file"
@@ -68,19 +70,19 @@ start_tmux_session() {
# Authserver always via acore.sh for auto-restart # Authserver always via acore.sh for auto-restart
AUTH_CMD="${SERVER_ROOT}/_server/azerothcore/acore.sh run-authserver" AUTH_CMD="${SERVER_ROOT}/_server/azerothcore/acore.sh run-authserver"
# Worldserver command # Worldserver: normal vs debug (GDB)
if [[ $DEBUG_MODE -eq 1 ]]; then if [[ $DEBUG_MODE -eq 1 ]]; then
echo "DEBUG MODE: Worldserver will run under GDB" echo "DEBUG MODE: Worldserver will run under GDB"
WORLD_CMD="run-engine restart worldserver \ WORLD_CMD="${SERVER_ROOT}/_server/azerothcore/apps/startup-scripts/run-engine restart worldserver \
--bin-path ${SERVER_ROOT}/_server/azerothcore/env/dist/bin \ --bin-path ${SERVER_ROOT}/_server/azerothcore/env/dist/bin \
--server-config ${SERVER_ROOT}/_server/azerothcore/conf/worldserver.conf \ --server-config ${SERVER_ROOT}/_server/azerothcore/conf/worldserver.conf \
--session-manager tmux \ --session-manager tmux \
--gdb-enabled 1 \ --gdb-enabled 1 \
--logs-path $LOGS_PATH \ --logs-path $LOGS_PATH \
--crashes-path $CRASHES_PATH \ --crashes-path $CRASHES_PATH \
--no-restart" # <-- disables auto-restart in debug --no-restart"
else else
WORLD_CMD="run-engine restart worldserver \ WORLD_CMD="${SERVER_ROOT}/_server/azerothcore/apps/startup-scripts/run-engine restart worldserver \
--bin-path ${SERVER_ROOT}/_server/azerothcore/env/dist/bin \ --bin-path ${SERVER_ROOT}/_server/azerothcore/env/dist/bin \
--server-config ${SERVER_ROOT}/_server/azerothcore/conf/worldserver.conf \ --server-config ${SERVER_ROOT}/_server/azerothcore/conf/worldserver.conf \
--session-manager tmux \ --session-manager tmux \