From cfdcbd11ea8f92d447173883bfa61bae9e5664f3 Mon Sep 17 00:00:00 2001 From: Leon Date: Thu, 5 Aug 2021 09:07:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=A1Fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/sh/1custom.sh | 13 +++++++++---- Scripts/sh/1customCDN.sh | 17 +++++++++++------ Scripts/sh/v4.sh | 2 +- 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Scripts/sh/1custom.sh b/Scripts/sh/1custom.sh index 8bd7b02..6c4c62a 100644 --- a/Scripts/sh/1custom.sh +++ b/Scripts/sh/1custom.sh @@ -79,6 +79,9 @@ set_default_extra(){ CollectedRepo=${CollectedRepo:-"4"} sed -i "s/CollectedRepo=(4)/CollectedRepo=(${CollectedRepo})/g" $extra_shell_path sed -i "s/OtherRepo=()/OtherRepo=(${OtherRepo})/g" $extra_shell_path + echo -e "Ninja\n### (1)默认启动并自动更新,未运行成功将强制重装\n### (2)!!!未修改容器映射的请勿运行,否则会出现青龙打不开或者设备死机等不良后果,映射参考 https://github.com/MoonBegonia/ninja#%E5%AE%B9%E5%99%A8%E5%86%85" + read -p "Ninja="up" ##up为运行,down为不运行 输入您的设置(默认运行) up/down" Ninja + sed -i "s/\"up\"/\"${Ninja}\"" $extra_shell_path } # 将 ql extra 添加到定时任务 add_ql_extra(){ @@ -205,7 +208,8 @@ add_ql_bot(){ # 运行一次并简单设置 bot.json set_bot_json(){ ql bot - sleep 5 + echo -e "------ 机器累了,休息 10s ------" + sleep 10 echo -e "\"//user_id\": \"↓↓↓ 你的USERID,去除双引号 ↓↓↓\",\n\"user_id\": 123456789,\n\"//bot_token\": \"↓↓↓ 你的机器人TOKEN ↓↓↓\",\n\"bot_token\": \"123456789:ABCDEFGSHSFDASDFAD\",\n\"//api_id\": \"↓↓↓ https://my.telegram.org 在该网站申请到的id ↓↓↓\",\n\"api_id\": \"456423156\",\n\"//api_hash\": \"↓↓↓ https://my.telegram.org 在该网站申请到的hash ↓↓↓\",\n\"api_hash\": \"ASDFAWEFADSFAWEFDSFASFD\"," echo -e "----- 以上为示例,以下为你的配置(不要引号) -----" read -p "\"user_id\": " user_id @@ -220,10 +224,11 @@ set_bot_json(){ # 再运行一次 ql bot run_ql_bot(){ ql bot - sleep 5 + echo -e "------ 机器累了,休息 10s ------" + sleep 10 } if [ "${all}" = 1 ]; then - add_ql_bot && set_bot_json && run_ql_bot + add_ql_bot && set_bot_json && run_ql_bot else case ${bot} in 0) echo "已为您跳过 bot 操作" @@ -263,4 +268,4 @@ fi # 提示配置结束 -echo "配置到此结束,您是否成功了呢?" +echo -e "\n配置到此结束,您是否成功了呢?" diff --git a/Scripts/sh/1customCDN.sh b/Scripts/sh/1customCDN.sh index 466f433..73b2a2d 100644 --- a/Scripts/sh/1customCDN.sh +++ b/Scripts/sh/1customCDN.sh @@ -105,7 +105,7 @@ dl_extra_shell(){ # 授权 chmod 755 $extra_shell_path } -# extra.sh 预设仓库及默认拉取仓库设置 +# extra.sh 设置区设置 set_default_extra(){ echo -e "一、集成仓库(Collected Repositories)\n2-JDHelloWorld\n3-he1pu\n4-shufflewzc\n6-Aaron-lv\n7-yuannian1112" read -p "输入您想拉取集成仓库编号(回车默认为 4),拉取多个请用空格隔开:" CollectedRepo @@ -114,6 +114,9 @@ set_default_extra(){ CollectedRepo=${CollectedRepo:-"4"} sed -i "s/CollectedRepo=(4)/CollectedRepo=(${CollectedRepo})/g" $extra_shell_path sed -i "s/OtherRepo=()/OtherRepo=(${OtherRepo})/g" $extra_shell_path + echo -e "Ninja\n### (1)默认启动并自动更新,未运行成功将强制重装\n### (2)!!!未修改容器映射的请勿运行,否则会出现青龙打不开或者设备死机等不良后果,映射参考 https://github.com/MoonBegonia/ninja#%E5%AE%B9%E5%99%A8%E5%86%85" + read -p "Ninja="up" ##up为运行,down为不运行 输入您的设置(默认运行) up/down" Ninja + sed -i "s/\"up\"/\"${Ninja}\"" $extra_shell_path } # 将 ql extra 添加到定时任务 add_ql_extra(){ @@ -264,7 +267,8 @@ add_ql_bot(){ # 运行一次并简单设置 bot.json set_bot_json(){ ql bot - sleep 5 + echo -e "------ 机器累了,休息 10s ------" + sleep 10 echo -e "\"//user_id\": \"↓↓↓ 你的USERID,去除双引号 ↓↓↓\",\n\"user_id\": 123456789,\n\"//bot_token\": \"↓↓↓ 你的机器人TOKEN ↓↓↓\",\n\"bot_token\": \"123456789:ABCDEFGSHSFDASDFAD\",\n\"//api_id\": \"↓↓↓ https://my.telegram.org 在该网站申请到的id ↓↓↓\",\n\"api_id\": \"456423156\",\n\"//api_hash\": \"↓↓↓ https://my.telegram.org 在该网站申请到的hash ↓↓↓\",\n\"api_hash\": \"ASDFAWEFADSFAWEFDSFASFD\"," echo -e "----- 以上为示例,以下为你的配置(不要引号) -----" read -p "\"user_id\": " user_id @@ -279,10 +283,11 @@ set_bot_json(){ # 再运行一次 ql bot run_ql_bot(){ ql bot - sleep 5 + echo -e "------ 机器累了,休息 10s ------" + sleep 10 } if [ "${all}" = 1 ]; then - add_ql_bot && set_bot_json && run_ql_bot + add_ql_bot && set_bot_json && run_ql_bot else case ${bot} in 0) echo "已为您跳过 bot 操作" @@ -302,7 +307,7 @@ add_curl_sample(){ echo "开始添加 task:curl config.sample.sh" # 获取token token=$(cat /ql/config/auth.json | jq --raw-output .token) - curl -s -H 'Accept: application/json' -H "Authorization: Bearer $token" -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept-Language: zh-CN,zh;q=0.9' --data-binary '{"name":"自动更新模板","command":"curl -L https://git.io/config.sh -o /ql/sample/config.sample.sh && cp -rf /ql/sample/config.sample.sh /ql/config","schedule":"45 6,18 * * *"}' --compressed 'http://127.0.0.1:5700/api/crons?t=1627380635389' + curl -s -H 'Accept: application/json' -H "Authorization: Bearer $token" -H 'Content-Type: application/json;charset=UTF-8' -H 'Accept-Language: zh-CN,zh;q=0.9' --data-binary '{"name":"自动更新模板","command":"curl -L https://raw.githubusercontents.com/Oreomeow/VIP/main/Conf/Qinglong/config.sample.sh -o /ql/sample/config.sample.sh && cp -rf /ql/sample/config.sample.sh /ql/config","schedule":"45 6,18 * * *"}' --compressed 'http://127.0.0.1:5700/api/crons?t=1627380635389' fi } run_curl_sample(){ @@ -322,4 +327,4 @@ fi # 提示配置结束 -echo "配置到此结束,您是否成功了呢?" +echo -e "\n配置到此结束,您是否成功了呢?" diff --git a/Scripts/sh/v4.sh b/Scripts/sh/v4.sh index 76355ab..6c9e610 100644 --- a/Scripts/sh/v4.sh +++ b/Scripts/sh/v4.sh @@ -156,7 +156,7 @@ input_container_name() { } input_container_name -# 是否安装WatchTower +# 是否安装 WatchTower inp "是否安装 containrrr/watchtower 自动更新 Docker 容器:\n1) 安装\n2) 不安装[默认]" echo -n -e "\e[33m输入您的选择->\e[0m" read watchtower