Files
llama-cmd-gen/start.sh
T

23 lines
489 B
Bash
Raw Normal View History

2026-07-19 18:08:36 +08:00
#!/bin/bash
2026-07-19 18:49:05 +08:00
# llama-cmd-gen 启动脚本
2026-07-19 18:08:36 +08:00
cd "$(dirname "$0")"
2026-07-19 18:49:05 +08:00
PYTHON=/home/hz1/miniconda3/envs/openclaw/bin/python3
2026-07-19 18:08:36 +08:00
2026-07-19 18:49:05 +08:00
# Kill existing process
lsof -ti:16052 | xargs kill -9 2>/dev/null
sleep 1
# Initialize database if needed
if [ ! -f data.db ]; then
$PYTHON db.py
fi
2026-07-19 18:08:36 +08:00
# Start server
2026-07-19 18:49:05 +08:00
setsid $PYTHON app.py > logs/app.log 2>&1 &
disown
echo "llama-cmd-gen started on port 16052"
echo "PID: $!"
sleep 2
curl -s http://127.0.0.1:16052/api/versions && echo "" || echo "Failed to start!"