mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
fast url
This commit is contained in:
parent
bf2c2cea57
commit
7e3203b6f1
2 changed files with 3 additions and 5 deletions
|
@ -1,3 +1,3 @@
|
|||
# Administrator 管理手册
|
||||
|
||||
## 环境
|
||||
## 数据同步
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue