#!/bin/bash INFRA=" albatross bobolink boobie dipper magpie quetzal starling swan " cd /var/www/mirrorstats.gentoo.org/gentoo-mirrorstats/rsync_mirrors # Grab mirrors from the web [[ -d ./var ]] || mkdir ./var ./get-mirror-list-rsync.rb > ./var/g.mirrors # infra mirrors, "manually added" to list to check for i in ${INFRA}; do echo "gentoo rsync://$i.gentoo.org" >> ./var/g.mirrors done # fatal if the state file is NOT present. [[ -e ./var/mirmon.state ]] || touch ./var/mirmon.state # run mirmon /usr/bin/perl ../../mirmon -c ./mirmon.conf -q -get update [[ -d ../../htdocs/rsync ]] || mkdir ../../htdocs/rsync # Set up a nice link to our mirror page directly: sed \ -e 's#mirrors#mirrors#' \ >../../htdocs/rsync/index.html <../../htdocs/rsync/index-wip.html