From e8205e9a761f4dde3547da450d657a68910dee0e Mon Sep 17 00:00:00 2001 From: liuwei Date: Tue, 6 May 2025 10:49:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E8=99=9A=E6=8B=9F=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restart.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/restart.sh b/restart.sh index b852c49..8b1a633 100644 --- a/restart.sh +++ b/restart.sh @@ -5,7 +5,8 @@ cd /home/liuwei/wechatbot/WeChatRobot # 拉取最新代码 git pull origin feature-855 # 根据需要拉取对应的分支 - +#切换虚拟环境 +source venv/bin/activate # 查找并杀死当前 main.py 进程 CURRENT_PID=$(ps aux | grep 'main.py' | grep -v grep | awk '{print $2}') if [ -n "$CURRENT_PID" ]; then