Core tests / core (push) Successful in 9m57s
Full verification / application (push) Failing after 5m16s
Full verification / local-brain (push) Failing after 6m15s
Realm simulation / simulated-live-world (push) Failing after 5m32s
WoW integration lab / real-worldserver (push) Canceled after 17m23s
Source branch: feature/ai-brain-router Source commit: c2a09e0460465201a58aaab56c71424e9a96405e
53 lines
1.6 KiB
Bash
53 lines
1.6 KiB
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
find_lab_root(){
|
|
if [[ -n "${AZEROTHAI_PLAYABLE_ROOT:-}" && -d "$AZEROTHAI_PLAYABLE_ROOT" ]]; then
|
|
printf '%s' "$AZEROTHAI_PLAYABLE_ROOT"; return
|
|
fi
|
|
for root in "$HOME/azerothai-pc-lab" "$HOME/azerothai-playable"; do
|
|
if [[ -d "$root" ]]; then printf '%s' "$root"; return; fi
|
|
done
|
|
printf '%s' "$HOME/azerothai-playable"
|
|
}
|
|
|
|
LAB_ROOT="$(find_lab_root)"
|
|
ACORE_ROOT="$LAB_ROOT/azerothcore"
|
|
|
|
stop_pid_file(){
|
|
local label="$1" file="$2"
|
|
if [[ ! -f "$file" ]]; then return; fi
|
|
local pid
|
|
pid="$(cat "$file" 2>/dev/null || true)"
|
|
if [[ -n "$pid" ]] && kill -0 "$pid" 2>/dev/null; then
|
|
echo "Stopping $label PID $pid..."
|
|
kill "$pid" 2>/dev/null || true
|
|
for _ in {1..20}; do
|
|
if ! kill -0 "$pid" 2>/dev/null; then break; fi
|
|
sleep 0.25
|
|
done
|
|
kill -9 "$pid" 2>/dev/null || true
|
|
fi
|
|
rm -f "$file"
|
|
}
|
|
|
|
if sudo systemctl list-unit-files azerothai-autonomy.service >/dev/null 2>&1; then
|
|
echo "Stopping AzerothAI autonomy service..."
|
|
sudo systemctl disable --now azerothai-autonomy.service >/dev/null 2>&1 || true
|
|
fi
|
|
|
|
if sudo systemctl list-unit-files azerothai-ale-relay.service >/dev/null 2>&1; then
|
|
echo "Stopping AzerothAI ALE relay service..."
|
|
sudo systemctl disable --now azerothai-ale-relay.service >/dev/null 2>&1 || true
|
|
fi
|
|
stop_pid_file "AzerothAI autonomy worker" "$LAB_ROOT/autonomy.pid"
|
|
|
|
if [[ -d "$ACORE_ROOT" ]]; then
|
|
echo "Stopping AzerothCore containers..."
|
|
(cd "$ACORE_ROOT" && docker compose down)
|
|
fi
|
|
|
|
stop_pid_file "AzerothAI" "$LAB_ROOT/azerothai.pid"
|
|
|
|
echo "Stopped. Database, client data, AzerothAI state, bot identities, memories, and logs were preserved."
|