新闻智能跟踪系统 v1.0.0: AI资讯自动采集+智能分析+邮件通知+网页管理台

This commit is contained in:
2026-08-20 00:26:07 +08:00
commit 5e0dbccc21
19 changed files with 2256 additions and 0 deletions
Executable
+47
View File
@@ -0,0 +1,47 @@
#!/bin/bash
# 新闻智能跟踪系统 启动/停止脚本
# 用法: ./start.sh [stop|restart|status]
cd "$(dirname "$0")"
PORT=16100
PID_FILE="logs/app.pid"
PY=/home/hz1/miniconda3/envs/openclaw/bin/python3
start() {
if [ -f "$PID_FILE" ] && kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then
echo "已在运行 (PID $(cat "$PID_FILE"))"
return
fi
mkdir -p logs
nohup "$PY" app.py > logs/app.log 2>&1 &
echo $! > "$PID_FILE"
sleep 2
if kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then
echo "✅ 启动成功 http://0.0.0.0:$PORT/"
else
echo "❌ 启动失败,查看 logs/app.log"
fi
}
stop() {
if [ -f "$PID_FILE" ]; then
kill "$(cat "$PID_FILE")" 2>/dev/null && echo "已停止" || echo "进程不存在"
rm -f "$PID_FILE"
else
echo "未在运行"
fi
}
status() {
if [ -f "$PID_FILE" ] && kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then
echo "运行中 (PID $(cat "$PID_FILE"))"
else
echo "未运行"
fi
}
case "$1" in
stop) stop ;;
restart) stop; sleep 1; start ;;
status) status ;;
*) start ;;
esac