mirror of
https://github.com/hermensbas/azerothcore_installer.git
synced 2026-01-13 00:28:33 +00:00
Compare commits
54 Commits
922fa826f6
...
4d100d16fa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d100d16fa | ||
|
|
ea1b6858d5 | ||
|
|
558e5f0c65 | ||
|
|
de0b739752 | ||
|
|
2118660541 | ||
|
|
621cacfc9e | ||
|
|
d53b14921e | ||
|
|
d4d015bd66 | ||
|
|
bc29002bc4 | ||
|
|
2a07a24b1b | ||
|
|
8cf342bb3b | ||
|
|
4559274331 | ||
|
|
f04c6696da | ||
|
|
6a68aaea1b | ||
|
|
8d7a6ba040 | ||
|
|
12f01fcebc | ||
|
|
c4efbde132 | ||
|
|
0729f8e380 | ||
|
|
ed46446dc2 | ||
|
|
9021b813a6 | ||
|
|
c71f3ac49c | ||
|
|
3f0ff461bf | ||
|
|
7298b563a7 | ||
|
|
28c1c9e982 | ||
|
|
1650263e19 | ||
|
|
ce8edb03d1 | ||
|
|
1c1c5de5b4 | ||
|
|
eefc652982 | ||
|
|
92cc0b091e | ||
|
|
d0f10cc175 | ||
|
|
8089819dd4 | ||
|
|
2ca4a186f3 | ||
|
|
72b4a45763 | ||
|
|
036e0bf4c0 | ||
|
|
dc42136daa | ||
|
|
acdc2cd5ef | ||
|
|
05b036d26f | ||
|
|
9bfc7ec2a5 | ||
|
|
9fa3306079 | ||
|
|
2110eaa085 | ||
|
|
7e0624e11c | ||
|
|
b7c47260d7 | ||
|
|
fd7888f0db | ||
|
|
dbce6dd149 | ||
|
|
d98ab58161 | ||
|
|
9133dfc95d | ||
|
|
88abb286c2 | ||
|
|
9049c90251 | ||
|
|
4a8e9f2b78 | ||
|
|
bd74d98366 | ||
|
|
4ec40b245c | ||
|
|
c69aac1a4d | ||
|
|
6cafcd58a4 | ||
|
|
491c9df8a1 |
@@ -9,6 +9,7 @@ Expansion = 2
|
||||
MaxPlayerLevel = 80
|
||||
GameType = 1
|
||||
PlayerLimit = 0
|
||||
LogsDir = "/tmp/ac/logs"
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# new player config
|
||||
|
||||
@@ -51,6 +51,7 @@ then
|
||||
libreadline-dev \
|
||||
libncurses-dev \
|
||||
mysql-server \
|
||||
gdb \
|
||||
libboost-all-dev
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
export CTYPE=RelWithDebInfo
|
||||
else
|
||||
export CTYPE=Release
|
||||
fi
|
||||
|
||||
read -p "This will compile server. Are you sure? (Y)es/(N)o: " -n 1 -r
|
||||
echo " ";
|
||||
if [[ $REPLY =~ ^[Yy]$ ]];
|
||||
@@ -29,9 +35,10 @@ then
|
||||
# https://www.azerothcore.org/wiki/linux-core-installation
|
||||
##########################################################################################
|
||||
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler clean
|
||||
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler configure -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
sudo -E ${ROOT_DIR}/_server/azerothcore/acore.sh compiler configure
|
||||
sudo ${ROOT_DIR}/_server/azerothcore/acore.sh compiler compile
|
||||
|
||||
|
||||
##########################################################################################
|
||||
# set folder rights to current user
|
||||
##########################################################################################
|
||||
|
||||
@@ -1,34 +1,114 @@
|
||||
#!/bin/bash
|
||||
|
||||
##########################################################################################
|
||||
# handle the tmux sessions
|
||||
# Paths for logs and crash dumps
|
||||
##########################################################################################
|
||||
if tmux new-session -d -s $AUTHSERVER_SESSION; then
|
||||
echo "Created authserver session: $AUTHSERVER_SESSION"
|
||||
else
|
||||
echo "Error when trying to create authserver session: $AUTHSERVER_SESSION"
|
||||
fi
|
||||
echo " "
|
||||
export LOGS_PATH="/tmp/ac/logs"
|
||||
export CRASHES_PATH="/tmp/ac/crashes"
|
||||
rm -rf "$LOGS_PATH" "$CRASHES_PATH"
|
||||
mkdir -p "$LOGS_PATH" "$CRASHES_PATH"
|
||||
|
||||
if tmux new-session -d -s $WORLDSERVER_SESSION; then
|
||||
echo "Created worldserver session: $WORLDSERVER_SESSION"
|
||||
else
|
||||
echo "Error when trying to create worldserver session: $WORLDSERVER_SESSION"
|
||||
fi
|
||||
echo " "
|
||||
##########################################################################################
|
||||
# Sessions
|
||||
##########################################################################################
|
||||
AUTHSERVER_SESSION="auth-session"
|
||||
WORLDSERVER_SESSION="world-session"
|
||||
|
||||
if tmux send-keys -t $AUTHSERVER_SESSION "${SERVER_ROOT}/acore.sh run-authserver" C-m; then
|
||||
echo "Executed \"${SERVER_ROOT}/acore.sh run-authserver \" inside $AUTHSERVER_SESSION"
|
||||
else
|
||||
echo "Error when executing \"${SERVER_ROOT}/acore.sh run-authserver\" inside $AUTHSERVER_SESSION"
|
||||
fi
|
||||
echo " "
|
||||
# Timestamps for log files
|
||||
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
|
||||
AUTH_LOG="$LOGS_PATH/authserver_$TIMESTAMP.log"
|
||||
WORLD_LOG="$LOGS_PATH/worldserver_$TIMESTAMP.log"
|
||||
GDB_LOG="$CRASHES_PATH/worldserver_gdb_$TIMESTAMP.log"
|
||||
|
||||
if tmux send-keys -t $WORLDSERVER_SESSION "${SERVER_ROOT}/acore.sh run-worldserver" C-m; then
|
||||
echo "Executed \"${SERVER_ROOT}/acore.sh run-worldserver\" inside $WORLDSERVER_SESSION"
|
||||
else
|
||||
echo "Error when executing \"${SERVER_ROOT}/acore.sh run-worldserver\" inside $WORLDSERVER_SESSION"
|
||||
##########################################################################################
|
||||
# Determine SERVER_ROOT based on script location (works with aliases)
|
||||
##########################################################################################
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
|
||||
##########################################################################################
|
||||
# Check debug toggle
|
||||
##########################################################################################
|
||||
DEBUG_MODE=0
|
||||
if [[ "$1" == "debug" ]]; then
|
||||
DEBUG_MODE=1
|
||||
fi
|
||||
|
||||
echo " "
|
||||
source ${ROOT_DIR}/script/menu.sh
|
||||
##########################################################################################
|
||||
# Helper to start a tmux session
|
||||
##########################################################################################
|
||||
start_tmux_session() {
|
||||
local session_name=$1
|
||||
local command=$2
|
||||
|
||||
# If session exists, attach and return
|
||||
if tmux has-session -t "$session_name" 2>/dev/null; then
|
||||
echo "Tmux session '$session_name' already exists. Attaching..."
|
||||
tmux attach-session -t "$session_name"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Create new session
|
||||
if tmux new-session -d -s "$session_name"; then
|
||||
echo "Created tmux session: $session_name"
|
||||
else
|
||||
echo "Error creating tmux session: $session_name"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Export environment variables inside tmux
|
||||
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 log file
|
||||
tmux send-keys -t "$session_name" "$command" C-m
|
||||
|
||||
echo "Running '$command' in $session_name"
|
||||
echo
|
||||
}
|
||||
|
||||
##########################################################################################
|
||||
# Prepare commands
|
||||
##########################################################################################
|
||||
|
||||
# Authserver via acore.sh for auto-restart
|
||||
AUTH_CMD="${ROOT}/_server/azerothcore/acore.sh run-authserver"
|
||||
|
||||
# Worldserver
|
||||
if [[ $DEBUG_MODE -eq 1 ]]; then
|
||||
|
||||
# via GDB with RelWithDebInfo or Debug build
|
||||
echo "DEBUG MODE: Running worldserver under GDB"
|
||||
WORLD_CMD="cd $ROOT/_server/azerothcore/env/dist/bin && \
|
||||
gdb -ex \"set logging file $GDB_LOG\" \
|
||||
-ex \"set logging on\" \
|
||||
-ex \"set pagination off\" \
|
||||
-ex \"set confirm off\" \
|
||||
-ex \"set print thread-events on\" \
|
||||
-ex \"set print object on\" \
|
||||
-ex \"catch signal SIGSEGV\" \
|
||||
-ex \"catch signal SIGABRT\" \
|
||||
-ex \"catch signal SIGFPE\" \
|
||||
-ex \"catch signal SIGILL\" \
|
||||
-ex \"run -c ../etc/worldserver.conf\" \
|
||||
-ex \"thread apply all bt full\" \
|
||||
-ex \"info threads\" \
|
||||
-ex \"thread apply all info locals\" \
|
||||
-ex \"quit\" \
|
||||
--args ./worldserver"
|
||||
else
|
||||
|
||||
# via acore.sh for auto-restart
|
||||
WORLD_CMD="$ROOT/_server/azerothcore/acore.sh run-worldserver"
|
||||
fi
|
||||
|
||||
##########################################################################################
|
||||
# Start servers
|
||||
##########################################################################################
|
||||
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
|
||||
|
||||
@@ -5,9 +5,11 @@ echo "### menu - Shows menu"
|
||||
echo "### install - Download the source source-code"
|
||||
echo "### update - Updates source-code to latest version"
|
||||
echo "### build - Builds the server based on source-code"
|
||||
echo "### compile - Compiles the code based on the build server"
|
||||
echo "### compile - Compiles code with Release for hosting"
|
||||
echo "### compile_debug - Compiles code with RelWithDebInfo for debugging"
|
||||
echo "### config - Applies the server configration"
|
||||
echo "### start - starts auth and world in tmux sessions server"
|
||||
echo "### start_debug - starts auth and world debug mode (GDB)"
|
||||
echo "### stop - stops all sessions"
|
||||
echo "### wow - logon world-server (tmux) session"
|
||||
echo "### auth - logon auth-server (tmux) session"
|
||||
|
||||
2
setup.sh
2
setup.sh
@@ -86,8 +86,10 @@ echo "alias install='${ROOT_DIR}/script/1_source-install.sh'" >> ~/.bash_wow
|
||||
echo "alias update='${ROOT_DIR}/script/2_source-update.sh'" >> ~/.bash_wow
|
||||
echo "alias build='${ROOT_DIR}/script/3_server-build.sh'" >> ~/.bash_wow
|
||||
echo "alias compile='${ROOT_DIR}/script/4_server-compile.sh'" >> ~/.bash_wow
|
||||
echo "alias compile_debug='${ROOT_DIR}/script/4_server-compile.sh debug'" >> ~/.bash_wow
|
||||
echo "alias config='${ROOT_DIR}/script/5_server-configure.sh'" >> ~/.bash_wow
|
||||
echo "alias start='${ROOT_DIR}/script/6_server-start.sh'" >> ~/.bash_wow
|
||||
echo "alias start_debug='${ROOT_DIR}/script/6_server-start.sh debug'" >> ~/.bash_wow
|
||||
echo "alias stop='tmux kill-server'" >> ~/.bash_wow
|
||||
echo "alias wow='cd ${SERVER_ROOT};tmux attach -t ${WORLDSERVER_SESSION}'" >> ~/.bash_wow
|
||||
echo "alias auth='cd ${SERVER_ROOT};tmux attach -t ${AUTHSERVER_SESSION}'" >> ~/.bash_wow
|
||||
|
||||
Reference in New Issue
Block a user