This commit is contained in:
qiaofeng1227 2023-05-30 15:10:17 +08:00
parent bf2c2cea57
commit 7e3203b6f1
2 changed files with 3 additions and 5 deletions

View file

@ -1,3 +1,3 @@
# Administrator 管理手册
## 环境
## 数据同步

View file

@ -313,7 +313,6 @@ function fastest_url() {
for url in "${urls[@]}"; do
time=$(curl --connect-timeout 3 -s -w '%{time_total}\n' -o /dev/null $url)
echo $url is $time
if (( $(echo "$time < $fastest_time || $fastest_time == 0" | bc -l) )); then
fastest_time=$time
fastest_url=$url
@ -347,13 +346,12 @@ ParpareStaticFiles(){
echo "Parpare to install ..."
fasturl=$(fastest_url "${urls[@]}")
sleep 20s
echo "curl 5 times, avera fast url is: "$fasturl
echo "fast url is: "$fasturl
# download apps
mkdir -p /data/apps
clone_repo $fasturl/Websoft9/docker-library /data/library
clone_repo $fasturl/Websoft9/Stackhub /data/apps/stackhub
clone_repo $fasturl/Websoft9/StackHub /data/apps/stackhub
clone_repo $fasturl/Websoft9/stackhub-web /data/stackhubweb
}