@@ -45,7 +45,7 @@ if [ ! -e '/usr/sbin/virt-what' ]; then
4545 else
4646 apt-get update > /dev/null 2>&1
4747 apt-get -y install virt-what > /dev/null 2>&1
48- fi
48+ fi
4949fi
5050
5151
@@ -167,7 +167,7 @@ speed() {
167167speed_test_cn(){
168168 if [[ $1 == ' ' ]]; then
169169 temp=$(python /tmp/speedtest.py --share 2>&1)
170- is_down=$(echo "$temp" | grep ' Download' )
170+ is_down=$(echo "$temp" | grep ' Download' )
171171 if [[ ${is_down} ]]; then
172172 local REDownload=$(echo "$temp" | awk -F ' :' ' /Download/{print $2 }' )
173173 local reupload=$(echo "$temp" | awk -F ' :' ' /Upload/{print $2 }' )
@@ -180,7 +180,7 @@ speed_test_cn(){
180180 fi
181181 else
182182 temp=$(python /tmp/speedtest.py --server $1 --share 2>&1)
183- is_down=$(echo "$temp" | grep ' Download' )
183+ is_down=$(echo "$temp" | grep ' Download' )
184184 if [[ ${is_down} ]]; then
185185 local REDownload=$(echo "$temp" | awk -F ' :' ' /Download/{print $2 }' )
186186 local reupload=$(echo "$temp" | awk -F ' :' ' /Upload/{print $2 }' )
@@ -201,7 +201,7 @@ speed_test_cn(){
201201 echo ${reupload} >> /tmp/speed_cn.txt
202202 echo ${REDownload} >> /tmp/speed_cn.txt
203203 echo ${relatency} >> /tmp/speed_cn.txt
204-
204+
205205
206206}
207207
@@ -214,10 +214,10 @@ speed_cn() {
214214 speed_test_cn ' 4863' "Xi' an CU"
215215 speed_test_cn '5083' 'Shanghai CU'
216216 speed_test_cn '5726' 'Chongqing CU'
217- speed_test_cn '5192' " Xi ' an CM "
218- speed_test_cn ' 4665' ' Shanghai CM '
219- speed_test_cn ' 4575' ' Chengdu CM '
220-
217+ speed_test_cn '5192' " Beijing CT "
218+ speed_test_cn '4665' 'Beijing CT '
219+ speed_test_cn '4575' 'Hunan CT '
220+
221221 rm -rf /tmp/speedtest.py
222222}
223223
399399if [[ $ifreport == 'y' ]];then
400400 echo " "
401401 myip=` curl -m 10 -s http://members.3322.org/dyndns/getip`
402- echo "Visit http://${myip}:8001/index.html to see your report,Press Ctrl + C to exit."
402+ echo " Visit http://${myip} :8001/index.html to see your report,Press Ctrl + C to exit."
403403 cd /tmp/report
404404 python -m SimpleHTTPServer 8001
405405 iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8001 -j ACCEPT
0 commit comments