From ce77a332281e312010b8ea8af11e0a3bb12063b8 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Tue, 25 Jul 2023 13:54:59 +0200 Subject: [PATCH] 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. --- examples/mirror-to-mirror.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/mirror-to-mirror.sh b/examples/mirror-to-mirror.sh index 71b66f11..9c0e937b 100644 --- a/examples/mirror-to-mirror.sh +++ b/examples/mirror-to-mirror.sh @@ -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