更新 nt_install.sh

https://github.com/nxtrace/NTrace-core/issues/300
This commit is contained in:
tsosunchia
2025-04-28 10:02:47 +08:00
committed by GitHub
parent 7bfccf9da4
commit 93c0f8558b

View File

@@ -60,7 +60,7 @@ checkSystemDistribution() {
downloadBinrayFile() {
echo -e "${Info} 获取最新版的 NextTrace 发行版文件信息"
for i in {1..3}; do
downloadUrls=$(curl -sLf ${protocol}://www.nxtrace.org/api/dist/core/nexttrace_${osDistribution}_${archParam} --connect-timeout 1.5)
downloadUrls=$(curl -sLf ${protocol}://www.nxtrace.org/api/dist/core/nexttrace_${osDistribution}_${archParam} --connect-timeout 2)
if [ $? -eq 0 ]; then
break
fi
@@ -70,7 +70,7 @@ downloadBinrayFile() {
backupUrl=$(echo ${downloadUrls} | awk -F '|' '{print $2}')
echo -e "${Info} 正在尝试从 Primary 节点下载 NextTrace"
for i in {1..3}; do
curl -sLf ${primaryUrl} -o ${Temp_path} --connect-timeout 1.5
curl -sLf ${primaryUrl} -o ${Temp_path} --connect-timeout 2
if [ $? -eq 0 ]; then
changeMode
mv ${Temp_path} ${downPath}
@@ -84,7 +84,7 @@ downloadBinrayFile() {
fi
echo -e "${Error} 从 Primary 节点下载失败,正在尝试从 Backup 节点下载 NextTrace"
for i in {1..3}; do
curl -sLf ${backupUrl} -o ${Temp_path} --connect-timeout 1.5
curl -sLf ${backupUrl} -o ${Temp_path} --connect-timeout 2
if [ $? -eq 0 ]; then
changeMode
mv ${Temp_path} ${downPath}