This commit is contained in:
Leon 2021-08-02 11:19:53 +08:00 committed by GitHub
parent 8f2dbb19d3
commit 601d862e8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -215,24 +215,23 @@ set_bot_json(){
sed -i "s/456423156/${api_id}/" $bot_json sed -i "s/456423156/${api_id}/" $bot_json
sed -i "s/ASDFAWEFADSFAWEFDSFASFD/${api_hash}/" $bot_json sed -i "s/ASDFAWEFADSFAWEFDSFASFD/${api_hash}/" $bot_json
} }
# 重启 # 再运行一次 ql bot
ql_restart(){ run_ql_bot(){
ql restart ql bot
} }
if [ "${all}" = 1 ]; then if [ "${all}" = 1 ]; then
add_ql_bot && set_bot_json && ql_restart add_ql_bot && set_bot_json && run_ql_bot
else else
case ${bot} in case ${bot} in
0) echo "已为您跳过 bot 操作" 0) echo "已为您跳过 bot 操作"
;; ;;
1) add_ql_bot 1) add_ql_bot
;; ;;
2) add_ql_bot && set_bot_json && ql_restart 2) add_ql_bot && set_bot_json && run_ql_bot
esac esac
fi fi
# 添加定时任务 自动更新模板 # 添加定时任务 自动更新模板
add_curl_sample(){ add_curl_sample(){
if [ "$(grep -c "config.sample.sh" /ql/config/crontab.list)" != 0 ]; then if [ "$(grep -c "config.sample.sh" /ql/config/crontab.list)" != 0 ]; then