40 lines
840 B
Bash
Executable File
40 lines
840 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# AgentLiving 启动脚本
|
|
|
|
echo "🎮 Starting AgentLiving..."
|
|
echo ""
|
|
|
|
# 检查 OpenClaw Gateway
|
|
if ! curl -s http://127.0.0.1:18789/health > /dev/null 2>&1; then
|
|
echo "⚠️ OpenClaw Gateway 未启动,请先运行: openclaw gateway start"
|
|
exit 1
|
|
fi
|
|
|
|
echo "✅ OpenClaw Gateway 已连接"
|
|
|
|
# 启动 Bridge Server
|
|
echo "🌉 启动 Bridge Server..."
|
|
cd "$(dirname "$0")/bridge"
|
|
python3 bridge_server.py &
|
|
BRIDGE_PID=$!
|
|
echo "Bridge PID: $BRIDGE_PID"
|
|
|
|
# 等待 Bridge 启动
|
|
sleep 2
|
|
|
|
# 启动 Godot
|
|
echo "🎨 启动 Godot..."
|
|
cd "$(dirname "$0")/godot"
|
|
if command -v godot &> /dev/null; then
|
|
godot project.godot
|
|
else
|
|
echo "⚠️ 未找到 Godot 命令,请手动打开 godot/project.godot"
|
|
fi
|
|
|
|
# 清理
|
|
echo "🛑 关闭 Bridge Server..."
|
|
kill $BRIDGE_PID 2>/dev/null
|
|
|
|
echo "👋 AgentLiving 已关闭"
|