From 4983f31f60afbb6810ecffee14944ab1ec47e569 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 10 May 2021 10:28:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=90=AF=E5=8A=A8bot?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/bot.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/shell/bot.sh b/shell/bot.sh index bf9af755..ae223ad1 100644 --- a/shell/bot.sh +++ b/shell/bot.sh @@ -22,9 +22,7 @@ pip3 install -r requirements.txt echo echo -e "4、启动bot程序...\n" -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 & +pm2 restart jbot 2>/dev/null || pm2 start jbot -n $dir_root/jbot --interpreter=python3 -- -m echo exit 0