From af8d52744e284a543615f5025b96dd62a7e4eccc Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 10 May 2021 22:05:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbot=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E8=A6=86=E7=9B=96bot.json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shell/bot.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shell/bot.sh b/shell/bot.sh index fd46b2d6..55b9e595 100644 --- a/shell/bot.sh +++ b/shell/bot.sh @@ -12,7 +12,9 @@ echo echo -e "2、下载bot所需文件...\n" git clone -b master https://ghproxy.com/https://github.com/SuMaiKaDe/jddockerbot.git $repo_path cp -rf "$repo_path/jbot" $dir_root -cp -f "$repo_path/config/bot.json" "$dir_root/config" +if [[ ! -f "$dir_root/config/bot.json" ]]; then + cp -f "$repo_path/config/bot.json" "$dir_root/config" +fi echo echo -e "3、安装python3依赖...\n" @@ -24,7 +26,7 @@ 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 & +nohup python3 -m jbot & >/dev/null 2>&1 echo exit 0