From 989c4228c1eb274c63d9a1ca3122154e77b1794f Mon Sep 17 00:00:00 2001 From: whyour Date: Sat, 8 May 2021 15:50:49 +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 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/shell/bot.sh b/shell/bot.sh index cc6b8e3e..25b3b09d 100644 --- a/shell/bot.sh +++ b/shell/bot.sh @@ -4,16 +4,20 @@ dir_shell=/ql/shell . $dir_shell/share.sh -echo -e "安装bot依赖...\n" +echo -e "1、安装bot依赖...\n" apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip3 install telethon python-socks[asyncio] pillow qrcode requests prettytable -echo -e "下载bot所需文件...\n" +echo -e "2、下载bot所需文件...\n" repo_path="${dir_repo}/SuMaiKaDe_jddockerbot" 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" +echo -e "3、启动bot程序...\n" cd $dir_root -nohup python3 -m jbot & \ No newline at end of file +kill -9 $(ps -ef | grep "python3 -m jbot" | grep -v grep | awk '{print $1}') 2>/dev/null +nohup python3 -m jbot & + +exit 0