Files
ComfyUI_Skills_OpenClaw/ui/run_ui.command
T
科林_Cyril Pilgrim ac09f04330 fix(ui): add automatic port cleanup logic to startup scripts
Motivation:
用户在多次尝试通过 ./run_ui.sh 启动面板时,常因旧的 Python 进程未释放 8189 端口而导致 [Errno 48] 错误。为了提供更顺滑的 AI Native 体验,启动脚本应具备自我诊断与环境清理能力。

Implementation:
- 分别在 run_ui.sh, run_ui.command 和 run_ui.bat 中注入了端口占用检测与强制杀进程逻辑。
- 在 Unix 系统使用 lsof/xargs,在 Windows 系统使用 netstat/taskkill,确保全平台兼容。
2026-03-08 00:12:19 +08:00

8 lines
181 B
Bash
Executable File

#!/bin/bash
cd "$(dirname "$0")"
echo "Ensuring port 8189 is free..."
lsof -ti:8189 | xargs kill -9 2>/dev/null || true
echo "Starting ComfyUI OpenClaw Skill UI..."
python3 app.py