From 90d4c99e61754a6c918463b70fa9c21732594370 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Sun, 7 Nov 2021 09:40:51 +0800 Subject: [PATCH] =?UTF-8?q?V6.7=20=E8=B0=83=E6=95=B4=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Scripts/AutoUpdate.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Scripts/AutoUpdate.sh b/Scripts/AutoUpdate.sh index e45b0f7..d3ede3a 100755 --- a/Scripts/AutoUpdate.sh +++ b/Scripts/AutoUpdate.sh @@ -3,7 +3,7 @@ # AutoUpdate for Openwrt # Dependences: bash wget-ssl/wget/uclient-fetch curl openssl jsonfilter -Version=V6.6.9 +Version=V6.7 function TITLE() { clear && echo "Openwrt-AutoUpdate Script by Hyy2001 ${Version}" @@ -348,7 +348,7 @@ function ANALYZE_API() { local url name date size version count sha256 local API_Cache=${Tmp_Path}/API_Cache [[ $(CHECK_TIME ${API_File} 1) == false ]] && { - DOWNLOADER --path ${Tmp_Path} --file-name API_Cache --dl ${DOWNLOADERS} --url "$(URL_X ${Github_Release}/API G@@1 F@@1) ${Github_API}@@1 " --no-url-name --timeout 3 --type 固件信息 --quiet + DOWNLOADER --path ${Tmp_Path} --file-name API_Cache --dl ${DOWNLOADERS} --url "$(URL_X ${Github_Release}/API G@@1 F@@1) ${Github_API}@@1 " --no-url-name --timeout 5 --type 固件信息 --quiet [[ ! $? == 0 || -z $(cat ${API_Cache} 2> /dev/null) ]] && { ECHO r "Github API 请求错误,请检查网络后重试!" EXIT 2 @@ -403,7 +403,7 @@ function GET_CLOUD_LOG() { ;; esac [[ $(CHECK_TIME ${Tmp_Path}/Update_Logs.json 1) == false ]] && { - DOWNLOADER --path ${Tmp_Path} --file-name Update_Logs.json --dl ${DOWNLOADERS} --url "$(URL_X ${Github_Release} G@@1)" --timeout 3 --type 固件更新日志 --quiet + DOWNLOADER --path ${Tmp_Path} --file-name Update_Logs.json --dl ${DOWNLOADERS} --url "$(URL_X ${Github_Release} G@@1)" --timeout 5 --type 固件更新日志 --quiet } [[ -s ${Tmp_Path}/Update_Logs.json ]] && { Result=$(jsonfilter -i ${Tmp_Path}/Update_Logs.json -e '@["'""${TARGET_PROFILE}""'"]["'""${Version}""'"]' 2> /dev/null) @@ -759,20 +759,20 @@ function DOWNLOADER() { done case "${DL_Downloader}" in wget | wget-ssl) - DL_Template="$(which wget) --quiet --no-check-certificate --no-dns-cache -x -4 --tries 1 --timeout 5 -O" + DL_Template="$(which wget) --quiet --no-check-certificate -x -4 --tries 1 --timeout 10 -O" ;; curl) - DL_Template="$(which curl) --silent --insecure -L -k --connect-timeout 5 --retry 1 -o" + DL_Template="$(which curl) --silent --insecure -L -k --connect-timeout 10 --retry 1 -o" ;; uclient-fetch) - DL_Template="$(which uclient-fetch) --quiet --no-check-certificate -4 --timeout 5 -O" + DL_Template="$(which uclient-fetch) --quiet --no-check-certificate -4 --timeout 10 -O" ;; esac [[ ${Test_Mode} == 1 || ${Verbose_Mode} == 1 ]] && { DL_Template="${DL_Template/ --quiet / }" DL_Template="${DL_Template/ --silent / }" } - [[ -n ${DL_Timeout} ]] && DL_Template="${DL_Template/-timeout 5/-timeout ${DL_Timeout}}" + [[ -n ${DL_Timeout} ]] && DL_Template="${DL_Template/-timeout 10/-timeout ${DL_Timeout}}" local E=0 u;while [[ ${E} != ${DL_URL_Count} ]];do DL_URL_Cache="${DL_URL[$E]}" DL_Retries="${DL_URL_Cache##*@@}"