/office/* 反向代理到本机 univer-office Node 服务(9091),承接 markdown<->IDocumentData 转换 + docx/xlsx/ppt 导出。含 office_proxy.py + config.json 路由 + pipeline_app 注册 + restart-pipeline.sh
28 lines
695 B
Bash
28 lines
695 B
Bash
#!/bin/bash
|
||
# 重启 pipeline-app(避免 pkill -f pipeline_app 自杀:精确匹配 python 主进程路径)
|
||
cd /d/pipeline/pipeline-app
|
||
|
||
echo "=== 杀旧进程 ==="
|
||
if [ -f pipeline.pid ]; then
|
||
kill $(cat pipeline.pid) 2>/dev/null
|
||
fi
|
||
pkill -f "app/pipeline_app.py" 2>/dev/null
|
||
sleep 3
|
||
|
||
if pgrep -f "app/pipeline_app.py" > /dev/null; then
|
||
echo "still running, force kill"
|
||
pkill -9 -f "app/pipeline_app.py" 2>/dev/null
|
||
sleep 2
|
||
fi
|
||
rm -f pipeline.pid pipeline-web.pid pipeline-worker-*.pid
|
||
|
||
echo "=== 启动 ==="
|
||
bash start.sh
|
||
sleep 6
|
||
|
||
echo "=== 进程 ==="
|
||
ps aux | grep "app/pipeline_app.py" | grep -v grep | head -2
|
||
|
||
echo "=== 日志 tail ==="
|
||
tail -15 logs/pipeline.log 2>/dev/null
|