修复bot启动下载文件失败

This commit is contained in:
hanhh 2021-05-30 20:44:40 +08:00
parent ea56e44669
commit 307207dddd
2 changed files with 5 additions and 13 deletions

View File

@ -1,6 +1,6 @@
## Version: v2.0.0-05242340
## Date: 2021-05-24
## Update Content: 增加pip自定义源\n显示定时任务总条数\n修复同一个作者多仓库定时任务异常删除\n其他bug修复
## Version: v2.0.0-05302045
## Date: 2021-05-30
## Update Content: 增加ql bot命令所需文件提示
## 上面版本号中如果第2位数字有变化那么代表增加了新的参数如果只有第3位数字有变化仅代表更新了注释没有增加新的参数可更新可不更新
@ -33,7 +33,7 @@ AutoHelpOther=""
## 填 2 使用“随机顺序助力模板”,本套脚本内账号间随机顺序助力,每次生成的顺序都不一致。
HelpType=""
## 是否自动启动bot默认不启动设置为true时自动启动
## 是否自动启动bot默认不启动设置为true时自动启动目前需要自行克隆bot仓库所需代码存到ql目录下文件夹命名为dockerbot
AutoStartBot=""
## 安装bot依赖时指定pip源默认使用清华源如不需要源设置此参数为空

View File

@ -3,21 +3,13 @@
## 导入通用变量与函数
dir_shell=/ql/shell
. $dir_shell/share.sh
repo_path="${dir_repo}/SuMaiKaDe_jddockerbot"
url="https://ghproxy.com/https://github.com/SuMaiKaDe/jddockerbot.git"
repo_path="${dir_repo}/dockerbot"
echo -e "\n1、安装bot依赖...\n"
apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev
echo -e "\nbot依赖安装成功...\n"
echo -e "2、下载bot所需文件...\n"
if [ -d ${repo_path}/.git ]; then
reset_romote_url ${repo_path} ${url}
git_pull_scripts ${repo_path}
else
git_clone_scripts ${url} ${repo_path} "master"
fi
cp -rf "$repo_path/jbot" $dir_root
if [[ ! -f "$dir_root/config/bot.json" ]]; then
cp -f "$repo_path/config/bot.json" "$dir_root/config"