fix(scripts): update server paths for new VPS location

Start script now defaults to /home/fractured-panel/azeroth-server and
passes -c flags so binaries find configs regardless of compiled-in path.
Update script gains --prefix flag to override CMAKE_INSTALL_PREFIX
(persisted to conf/config.sh) during rebuild.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Docker Build
2026-05-11 19:43:49 -05:00
parent 999f7e94bd
commit d1d68cb44a
2 changed files with 29 additions and 5 deletions
+8 -5
View File
@@ -7,13 +7,15 @@
# AZEROTH_BIN=/path/to/azeroth-server/bin bash scripts/start-azeroth-servers.sh # AZEROTH_BIN=/path/to/azeroth-server/bin bash scripts/start-azeroth-servers.sh
# #
# Environment: # Environment:
# AZEROTH_BIN — directory with authserver and worldserver (default: /root/azeroth-server/bin) # AZEROTH_BIN — directory with authserver and worldserver (default: /home/fractured-panel/azeroth-server/bin)
# AZEROTH_LOG_DIR — log directory (default: <parent of bin>/logs) # AZEROTH_LOG_DIR — log directory (default: <parent of bin>/logs)
set -euo pipefail set -euo pipefail
BIN_DIR="${AZEROTH_BIN:-/root/azeroth-server/bin}" BIN_DIR="${AZEROTH_BIN:-/home/fractured-panel/azeroth-server/bin}"
LOG_DIR="${AZEROTH_LOG_DIR:-$(cd "$(dirname "$BIN_DIR")" && pwd)/logs}" BASE_DIR="$(cd "$(dirname "$BIN_DIR")" && pwd)"
LOG_DIR="${AZEROTH_LOG_DIR:-${BASE_DIR}/logs}"
CONF_DIR="${BASE_DIR}/etc"
AUTH_BIN="${BIN_DIR}/authserver" AUTH_BIN="${BIN_DIR}/authserver"
WORLD_BIN="${BIN_DIR}/worldserver" WORLD_BIN="${BIN_DIR}/worldserver"
@@ -35,15 +37,16 @@ mkdir -p "$LOG_DIR"
cd "$BIN_DIR" cd "$BIN_DIR"
nohup "$AUTH_BIN" >>"$LOG_DIR/authserver.log" 2>&1 & nohup "$AUTH_BIN" -c "${CONF_DIR}/authserver.conf" >>"$LOG_DIR/authserver.log" 2>&1 &
disown || true disown || true
sleep 2 sleep 2
nohup "$WORLD_BIN" >>"$LOG_DIR/worldserver.log" 2>&1 & nohup "$WORLD_BIN" -c "${CONF_DIR}/worldserver.conf" >>"$LOG_DIR/worldserver.log" 2>&1 &
disown || true disown || true
echo "Started authserver and worldserver (survives SSH disconnect)." echo "Started authserver and worldserver (survives SSH disconnect)."
echo "Bin: $BIN_DIR" echo "Bin: $BIN_DIR"
echo "Config: $CONF_DIR"
echo "Logs: $LOG_DIR/authserver.log" echo "Logs: $LOG_DIR/authserver.log"
echo " $LOG_DIR/worldserver.log" echo " $LOG_DIR/worldserver.log"
+21
View File
@@ -35,6 +35,7 @@ FULL_BUILD=0
COMPILE_ONLY=0 COMPILE_ONLY=0
DRY_RUN=0 DRY_RUN=0
DO_RUN_AFTER=0 DO_RUN_AFTER=0
INSTALL_PREFIX=""
POST_UPDATE_CMD="${FRACTURED_POST_UPDATE_CMD:-}" POST_UPDATE_CMD="${FRACTURED_POST_UPDATE_CMD:-}"
GIT_REMOTE="${FRACTURED_GIT_REMOTE:-origin}" GIT_REMOTE="${FRACTURED_GIT_REMOTE:-origin}"
@@ -49,6 +50,7 @@ Options:
--no-pull Skip git pull (only compile current tree). --no-pull Skip git pull (only compile current tree).
--full ./acore.sh compiler all (clean + configure + compile). --full ./acore.sh compiler all (clean + configure + compile).
--compile-only ./acore.sh compiler compile (incremental). --compile-only ./acore.sh compiler compile (incremental).
--prefix PATH Override CMAKE_INSTALL_PREFIX (updates conf/config.sh BINPATH).
--dry-run Print commands without running them. --dry-run Print commands without running them.
--run-after [CMD] Run shell command after successful compile. If CMD is omitted, --run-after [CMD] Run shell command after successful compile. If CMD is omitted,
uses FRACTURED_POST_UPDATE_CMD from the environment. uses FRACTURED_POST_UPDATE_CMD from the environment.
@@ -87,6 +89,15 @@ while [[ $# -gt 0 ]]; do
COMPILE_ONLY=1 COMPILE_ONLY=1
shift shift
;; ;;
--prefix)
shift
if [[ $# -eq 0 || "$1" == -* ]]; then
echo "error: --prefix requires a path argument" >&2
exit 2
fi
INSTALL_PREFIX="$1"
shift
;;
--dry-run) --dry-run)
DRY_RUN=1 DRY_RUN=1
shift shift
@@ -129,6 +140,16 @@ fi
cd "$ROOT" cd "$ROOT"
if [[ -n "$INSTALL_PREFIX" ]]; then
echo "==> updating conf/config.sh BINPATH to: $INSTALL_PREFIX"
if grep -q '^BINPATH=' conf/config.sh; then
run sed -i "s|^BINPATH=.*|BINPATH=\"$INSTALL_PREFIX\"|" conf/config.sh
else
echo "BINPATH=\"$INSTALL_PREFIX\"" >> conf/config.sh
fi
export BINPATH="$INSTALL_PREFIX"
fi
if [[ "$DO_RUN_AFTER" -eq 1 && -z "${POST_UPDATE_CMD// }" ]]; then if [[ "$DO_RUN_AFTER" -eq 1 && -z "${POST_UPDATE_CMD// }" ]]; then
echo "error: --run-after needs a command or FRACTURED_POST_UPDATE_CMD set in the environment." >&2 echo "error: --run-after needs a command or FRACTURED_POST_UPDATE_CMD set in the environment." >&2
exit 2 exit 2