summaryrefslogtreecommitdiff
path: root/apps/startup-scripts/src/examples/starter-world.sh
blob: 1eb1c4d32a436659c6789568e41abc56368a1a54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash

# AzerothCore World Server Starter Example
# This example shows how to use the run-engine to start worldserver without restart loop

PATH_RUNENGINE="./"
CONFIG_FILE="./conf-world.sh"

# Method 1: Using configuration file (recommended)
if [ -f "$CONFIG_FILE" ]; then
    echo "Starting worldserver (single run) with config file: $CONFIG_FILE"
    "$PATH_RUNENGINE/run-engine" start "$SERVERBIN" --config "$CONFIG_FILE"
else
    echo "Error: Configuration file not found: $CONFIG_FILE"
    echo "Please create $CONFIG_FILE by copying and modifying conf.sh.dist"
    echo "Make sure to set: export SERVERBIN=\"worldserver\""
    echo ""
    echo "Alternative: Start with binary path directly"
    echo "Example: $PATH_RUNENGINE/run-engine start /path/to/bin/worldserver"
    echo "Example: $PATH_RUNENGINE/run-engine start worldserver  # if in PATH"
    exit 1
fi

# Method 2: Direct binary path (full path)
# Uncomment the line below to start with full binary path
#
# "$PATH_RUNENGINE/run-engine" start /home/user/azerothcore/bin/worldserver --server-config /path/to/worldserver.conf

# Method 3: Binary name only (system PATH)
# Uncomment the line below if worldserver is in your system PATH
#
# "$PATH_RUNENGINE/run-engine" start worldserver --server-config /path/to/worldserver.conf

# Method 4: With session manager (tmux/screen)
# Uncomment the line below to use tmux session
#
# "$PATH_RUNENGINE/run-engine" start worldserver --session-manager tmux --server-config /path/to/worldserver.conf

# Method 5: Environment variables only
# Uncomment the lines below for environment variable configuration
#
# export RUN_ENGINE_BINPATH="/path/to/your/bin"
# export RUN_ENGINE_SERVERBIN="worldserver"
# export RUN_ENGINE_CONFIG="/path/to/worldserver.conf"
# "$PATH_RUNENGINE/run-engine" start worldserver