summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEsteban Carnevale <alfplayer@mailoo.org>2015-01-28 22:04:26 -0300
committerEsteban Carnevale <alfplayer@mailoo.org>2015-01-28 22:04:26 -0300
commit968624b1a5cd34bc411ed128beea1ffbc03ac6c9 (patch)
tree3135d51051cfe2db0bd66b18a64c16d4797cfc8a
parentf6d801c96de0f3d06aa3bf0b4dccc97bc63b2e85 (diff)
parabola-repos-speed-test: Add and remove mirrors, and small fixesHEADmaster
-rwxr-xr-xparabola-repos-speed-test51
1 files changed, 34 insertions, 17 deletions
diff --git a/parabola-repos-speed-test b/parabola-repos-speed-test
index b85903d..ad790b1 100755
--- a/parabola-repos-speed-test
+++ b/parabola-repos-speed-test
@@ -9,12 +9,18 @@ mail_to="your@mail.com"
script_filename="$(basename "$0")"
-log_dir="/var/log/${script_filename}"
+log_dir="$HOME/log/${script_filename}"
if [[ ! -d ${log_dir} ]] ; then
mkdir "${log_dir}"
fi
+if [[ ! -w ${log_dir} ]] ; then
+ echo -e "Can't write to log file directory: \"${log_dir}\".
+Nothing done."
+ exit 1
+fi
+
echo "=> ${script_filename} started. Start time: $(date -u --rfc-3339=seconds)" >> "${log_dir}/${script_filename}"
# Locking and send email on exit
@@ -46,16 +52,26 @@ test() {
wget --no-check-certificate -O /dev/null ${url}/community/os/x86_64/"${filename}" 2>&1 | sed -n -e 's|^.*(\([0-9.]\+ [KM]B/s\)).*$|\1|p' >> "${log_dir}/$repo"
}
+# parabolagnulinux.mirrors.linux.ro
+repo=parabolagnulinux.mirrors.linux.ro
+url='http://parabolagnulinux.mirrors.linux.ro'
+test
+
# repo.parabola.nu
-repo=repo
+repo=repo.parabola.nu
url='http://repo.parabola.nu'
test
# alfplayer.com
-repo=alfplayer
+repo=alfplayer.com
url='http://alfplayer.com/parabola'
test
+# snapshots.alfplayer.com
+repo=snapshots.alfplayer.com
+url='http://snapshots.alfplayer.com/parabola'
+test
+
# yandex.ru
repo=yandex
url='http://mirror.yandex.ru/mirrors/parabola'
@@ -66,20 +82,12 @@ repo=goodgnus
url='https://parabola.goodgnus.com.ar'
test
-# http://parabola.leth.cc/
-repo=leth
-url='http://parabola.leth.cc'
-test
-
-# Server = http://mirror.parlementum.net/$repo/os/$arch
-repo=parlementum
-url='http://mirror.parlementum.net'
-test
-
-# IPv6 only, https://parabola.fryxell.info
-#repo=fryxell
+# b.mirrors.fryxell.info
+# !! HTTP instead of HTTPS as listed in the file "mirrorlist"
+repo=b.mirrors.fryxell.info
#url='https://parabola.fryxell.info'
-#test
+url='http://b.mirrors.fryxell.info/parabolagnulinux'
+test
# custom file
#repo=""
@@ -92,6 +100,7 @@ echo "Rsync test"
echo "Using amsn package (around 11 MB)"
test_rsync() {
+ echo -n "$(date -u --rfc-3339=seconds) " >> "${log_dir}/$repo"
rm -f /tmp/"${script_filename}"-test.db
rsync -L --no-motd ${SERVER}/community/os/x86_64/community.db /tmp/"${script_filename}"-test.db
filename="$(tar xzOf /tmp/${script_filename}-test.db | grep '^amsn-.*pkg.tar.*$')"
@@ -100,10 +109,18 @@ test_rsync() {
rm -f /tmp/"${script_filename}"-testfile
}
-repo=rsync_alfplayer
+repo=rsync_alfplayer.com
SERVER="rsync://alfplayer.com:873/repos/parabola"
test_rsync
+repo=rsync_snapshots_alfplayer
+SERVER="rsync://snapshots.alfplayer.com/repos/parabola"
+test_rsync
+
+repo=rsync_parabolagnulinux.mirrors.linux.ro
+SERVER="rsync://parabolagnulinux.mirrors.linux.ro/parabolagnulinux"
+test_rsync
+
repo=rsync_repo.parabola.nu
SERVER="rsync://repo.parabola.nu:875/repos"
test_rsync