更新bot.sh,使ql bot后第三方bot使用pm2启动。

This commit is contained in:
chiupam 2022-01-14 10:20:13 +08:00
parent 917a739595
commit 559b712a06

View File

@ -46,7 +46,14 @@ echo -e "\npython3依赖安装成功...\n"
echo -e "4、启动bot程序...\n"
make_dir $dir_log/bot
if [[ -z ${BotRepoUrl} ]]; then
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 >$dir_log/bot/nohup.log 2>&1 &
else
cd $dir_root/jbot
pm2 start ecosystem.config.js
cd $dir_root
pm2 restart jbot
fi
echo -e "bot启动成功...\n"