mirror-to-mirror.sh: set 1h timeout for rsync runs

This script is run every 10 minutes or so to push new files to the primary
mirrors.  It sets a lock to prevent multiple copies from running in
parallel.  Yesterday, one rsync process got stuck and never exited, thereby
preventing this script from running.  Adding a 1h timeout seems like a safe
way to deal with this kind of problem.  This would not deal with rsync
getting so stuck that it fails to heed the timeout, hopefully that's not an
issue.
This commit is contained in:
Hans-Christoph Steiner 2023-07-25 13:54:59 +02:00
parent c88eb253f6
commit ce77a33228
No known key found for this signature in database
GPG Key ID: 3E177817BA1B9BFA
1 changed files with 1 additions and 0 deletions

View File

@ -19,6 +19,7 @@ for section in repo archive; 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 \
--timeout=3600 \
/home/fdroid/public_html/${section} \
${host}:/srv/fdroid-mirror.at.or.at/htdocs/fdroid/ &
set +x