From c67c3088f8c54779c3eda61502a89f4ebf4f63d8 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 10 May 2021 20:16:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0bot=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/bot.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shell/bot.sh b/shell/bot.sh index c76589d4..fd46b2d6 100644 --- a/shell/bot.sh +++ b/shell/bot.sh @@ -22,7 +22,9 @@ pip3 --default-timeout=100 install -r requirements.txt --no-cache-dir echo echo -e "4、启动bot程序...\n" -pm2 restart jbot 2>/dev/null || pm2 start $dir_root/jbot -n jbot --interpreter=python3 -- -m +cd $dir_root +ps -ef | grep "python3 -m jbot" | grep -v grep | awk '{print $1}' | xargs kill -9 2>/dev/null +nohup python3 -m jbot & echo exit 0