mirror-to-mirror.sh: also sync to ftp.lysator.liu.se, in parallel

This is the deployed script for pushing to the primary mirrors.  It starts
with the 'repo' section and runs all the rsyncs in parallel to each primary
mirror.  Once the 'repo' syncs are done, it does the same process for the
'archive' syncs.

[skip ci]
This commit is contained in:
Hans-Christoph Steiner 2020-09-17 11:43:16 +02:00
parent e7edd96a02
commit 465ec2e84e
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
1 changed files with 9 additions and 5 deletions

View File

@ -14,11 +14,15 @@ flock -n 200
set -e
cd /home/fdroid
for section in repo archive; do
for host in fdroid@mirror.f-droid.org; do
# be super careful with the trailing slashes here! if one is wrong, it'll delete the entire section!
rsync --archive --delay-updates --progress --delete \
/home/fdroid/public_html/${section} \
${host}:/srv/fdroid-mirror.at.or.at/htdocs/fdroid/
echo "Started $section at `date`:"
for host in fdroid@mirror.f-droid.org fdroid@ftp-push.lysator.liu.se; do
set -x
# be super careful with the trailing slashes here! if one is wrong, it'll delete the entire section!
rsync --archive --delay-updates --progress --delete \
/home/fdroid/public_html/${section} \
${host}:/srv/fdroid-mirror.at.or.at/htdocs/fdroid/ &
set +x
done
wait
done
) 200>/var/lock/root_fdroidmirrortomirror