Update 1customCDN.sh
This commit is contained in:
parent
78c8bd4ee6
commit
b085e1f509
@ -46,7 +46,7 @@ check_url() {
|
||||
|
||||
# 获取有效 config.sh 链接
|
||||
get_valid_config() {
|
||||
config_list=(https://raw.githubusercontents.com/Oreomeow/VIP/main/Conf/Qinglong/config.sample.sh https://raw.sevencdn.com/Oreomeow/VIP/main/Conf/Qinglong/config.sample.sh https://ghproxy.com/https://raw.githubusercontent.com/Oreomeow/VIP/main/Conf/Qinglong/config.sample.sh)
|
||||
config_list=(https://raw.githubusercontents.com/shufflewzc/VIP/main/Conf/Qinglong/config.sample.sh https://raw.sevencdn.com/shufflewzc/VIP/main/Conf/Qinglong/config.sample.sh https://ghproxy.com/https://raw.githubusercontent.com/shufflewzc/VIP/main/Conf/Qinglong/config.sample.sh)
|
||||
for url in ${config_list[@]}; do
|
||||
check_url $url
|
||||
if [ $? = 0 ]; then
|
||||
@ -79,7 +79,7 @@ fi
|
||||
|
||||
# 获取有效 extra.sh 链接
|
||||
get_valid_extra() {
|
||||
extra_list=(https://raw.githubusercontents.com/Oreomeow/VIP/main/Tasks/qlrepo/extra.sh https://raw.sevencdn.com/Oreomeow/VIP/main/Tasks/qlrepo/extra.sh https://ghproxy.com/https://raw.githubusercontent.com/Oreomeow/VIP/main/Tasks/qlrepo/extra.sh)
|
||||
extra_list=(https://raw.githubusercontents.com/shufflewzc/VIP/main/Tasks/qlrepo/extra.sh https://raw.sevencdn.com/shufflewzc/VIP/main/Tasks/qlrepo/extra.sh https://ghproxy.com/https://raw.githubusercontent.com/shufflewzc/VIP/main/Tasks/qlrepo/extra.sh)
|
||||
for url in ${extra_list[@]}; do
|
||||
check_url $url
|
||||
if [ $? = 0 ]; then
|
||||
@ -156,7 +156,7 @@ fi
|
||||
|
||||
# 获取有效 code.sh 链接
|
||||
get_valid_code() {
|
||||
code_list=(https://raw.githubusercontents.com/Oreomeow/VIP/main/Scripts/sh/Helpcode2.8/code.sh https://raw.sevencdn.com/Oreomeow/VIP/main/Scripts/sh/Helpcode2.8/code.sh https://ghproxy.com/https://raw.githubusercontents.com/Oreomeow/VIP/main/Scripts/sh/Helpcode2.8/code.sh)
|
||||
code_list=(https://raw.githubusercontents.com/shufflewzc/VIP/main/Scripts/sh/Helpcode2.8/code.sh https://raw.sevencdn.com/shufflewzc/VIP/main/Scripts/sh/Helpcode2.8/code.sh https://ghproxy.com/https://raw.githubusercontents.com/shufflewzc/VIP/main/Scripts/sh/Helpcode2.8/code.sh)
|
||||
for url in ${code_list[@]}; do
|
||||
check_url $url
|
||||
if [ $? = 0 ]; then
|
||||
@ -222,7 +222,7 @@ fi
|
||||
|
||||
# 获取有效 task_before.sh 链接
|
||||
get_valid_task_before() {
|
||||
task_before_list=(https://raw.githubusercontents.com/Oreomeow/VIP/main/Scripts/sh/Helpcode2.8/task_before.sh https://raw.sevencdn.com/Oreomeow/VIP/main/Scripts/sh/Helpcode2.8/task_before.sh https://ghproxy.com/https://raw.githubusercontents.com/Oreomeow/VIP/main/Scripts/sh/Helpcode2.8/task_before.sh)
|
||||
task_before_list=(https://raw.githubusercontents.com/shufflewzc/VIP/main/Scripts/sh/Helpcode2.8/task_before.sh https://raw.sevencdn.com/shufflewzc/VIP/main/Scripts/sh/Helpcode2.8/task_before.sh https://ghproxy.com/https://raw.githubusercontents.com/shufflewzc/VIP/main/Scripts/sh/Helpcode2.8/task_before.sh)
|
||||
for url in ${task_before_list[@]}; do
|
||||
check_url $url
|
||||
if [ $? = 0 ]; then
|
||||
@ -307,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://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'
|
||||
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/shufflewzc/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() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user