支持自定义BOT仓库 (#1051)

This commit is contained in:
Chiupam 2022-01-04 13:26:16 +08:00 committed by GitHub
parent ddee69d291
commit 8c4db8dd40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View File

@ -35,6 +35,9 @@ EnableExtraShell="true"
## 是否自动启动bot默认不启动设置为true时自动启动目前需要自行克隆bot仓库所需代码存到ql/repo目录下文件夹命名为dockerbot
AutoStartBot=""
## 是否使用第三方bot默认不使用使用时填入仓库地址存到ql/repo目录下文件夹命名为diybot
BotRepoUrl=""
## 安装bot依赖时指定pip源默认使用清华源如不需要源设置此参数为空
PipMirror="https://pypi.tuna.tsinghua.edu.cn/simple"

View File

@ -3,8 +3,14 @@
## 导入通用变量与函数
dir_shell=/ql/shell
. $dir_shell/share.sh
url="${github_proxy_url}https://github.com/SuMaiKaDe/bot.git"
repo_path="${dir_repo}/dockerbot"
if [[ -z ${BotRepoUrl} ]]; then
url="${github_proxy_url}https://github.com/SuMaiKaDe/bot.git"
repo_path="${dir_repo}/dockerbot"
else
url=${BotRepoUrl}
repo_path="${dir_repo}/diybot"
fi
echo -e "\n1、安装bot依赖...\n"
apk --no-cache add -f zlib-dev gcc jpeg-dev python3-dev musl-dev freetype-dev