mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(bash): startup-scripts reworked + bash scripts workflow integration (#22401)
This commit is contained in:
48
apps/startup-scripts/src/examples/restarter-auth.sh
Executable file
48
apps/startup-scripts/src/examples/restarter-auth.sh
Executable file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# AzerothCore Auth Server Restarter Example
|
||||
# This example shows how to use the run-engine with restart functionality for authserver
|
||||
|
||||
PATH_RUNENGINE="./"
|
||||
CONFIG_FILE="./conf-auth.sh"
|
||||
|
||||
# Method 1: Using configuration file (recommended)
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
echo "Starting authserver with restart loop using config file: $CONFIG_FILE"
|
||||
source "$CONFIG_FILE"
|
||||
"$PATH_RUNENGINE/run-engine" restart "$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=\"authserver\""
|
||||
echo ""
|
||||
echo "Alternative: Start with binary path directly"
|
||||
echo "Example: $PATH_RUNENGINE/run-engine restart /path/to/bin/authserver"
|
||||
echo "Example: $PATH_RUNENGINE/run-engine restart authserver # 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" restart /home/user/azerothcore/bin/authserver --server-config /path/to/authserver.conf
|
||||
|
||||
# Method 3: Binary name only (system PATH)
|
||||
# Uncomment the line below if authserver is in your system PATH
|
||||
#
|
||||
# "$PATH_RUNENGINE/run-engine" restart authserver --server-config /path/to/authserver.conf
|
||||
|
||||
# Method 4: With session manager (tmux/screen)
|
||||
# Uncomment the line below to use tmux session
|
||||
#
|
||||
# "$PATH_RUNENGINE/run-engine" restart authserver --session-manager tmux --server-config /path/to/authserver.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="authserver"
|
||||
# export RUN_ENGINE_CONFIG="/path/to/authserver.conf"
|
||||
# "$PATH_RUNENGINE/run-engine" restart authserver
|
||||
|
||||
|
||||
47
apps/startup-scripts/src/examples/restarter-world.sh
Executable file
47
apps/startup-scripts/src/examples/restarter-world.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# AzerothCore World Server Restarter Example
|
||||
# This example shows how to use the run-engine with restart functionality for worldserver
|
||||
|
||||
PATH_RUNENGINE="./"
|
||||
CONFIG_FILE="./conf-world.sh"
|
||||
|
||||
# Method 1: Using configuration file (recommended)
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
echo "Starting worldserver with restart loop using config file: $CONFIG_FILE"
|
||||
"$PATH_RUNENGINE/run-engine" restart "$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 restart /path/to/bin/worldserver"
|
||||
echo "Example: $PATH_RUNENGINE/run-engine restart 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" restart /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" restart 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" restart 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" restart worldserver
|
||||
|
||||
|
||||
46
apps/startup-scripts/src/examples/starter-auth.sh
Executable file
46
apps/startup-scripts/src/examples/starter-auth.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# AzerothCore Auth Server Starter Example
|
||||
# This example shows how to use the run-engine to start authserver without restart loop
|
||||
|
||||
PATH_RUNENGINE="./"
|
||||
CONFIG_FILE="./conf-auth.sh"
|
||||
|
||||
# Method 1: Using configuration file (recommended)
|
||||
if [ -f "$CONFIG_FILE" ]; then
|
||||
echo "Starting authserver (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=\"authserver\""
|
||||
echo ""
|
||||
echo "Alternative: Start with binary path directly"
|
||||
echo "Example: $PATH_RUNENGINE/run-engine start /path/to/bin/authserver"
|
||||
echo "Example: $PATH_RUNENGINE/run-engine start authserver # 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/authserver --server-config /path/to/authserver.conf
|
||||
|
||||
# Method 3: Binary name only (system PATH)
|
||||
# Uncomment the line below if authserver is in your system PATH
|
||||
#
|
||||
# "$PATH_RUNENGINE/run-engine" start authserver --server-config /path/to/authserver.conf
|
||||
|
||||
# Method 4: With session manager (tmux/screen)
|
||||
# Uncomment the line below to use tmux session
|
||||
#
|
||||
# "$PATH_RUNENGINE/run-engine" start authserver --session-manager tmux --server-config /path/to/authserver.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="authserver"
|
||||
# export RUN_ENGINE_CONFIG="/path/to/authserver.conf"
|
||||
# "$PATH_RUNENGINE/run-engine" start authserver
|
||||
|
||||
47
apps/startup-scripts/src/examples/starter-world.sh
Executable file
47
apps/startup-scripts/src/examples/starter-world.sh
Executable file
@@ -0,0 +1,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user