diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-12-29 12:26:03 (GMT) |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-12-29 12:26:03 (GMT) |
commit | 2a8b57f1858bd57e1f7744612e3e0990a3d4d377 (patch) | |
tree | bba97d21630e000e34df83033b83f9116416117a | |
parent | 1193b11cbb0ef2af7ebde6ce0db216a8855174f1 (diff) | |
download | site-2a8b57f1858bd57e1f7744612e3e0990a3d4d377.tar.gz |
check-mirrors: Add a timeout
Make sure that curl(1) won't hang forever.
-rwxr-xr-x | bin/check-mirrors | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/check-mirrors b/bin/check-mirrors index 7fbc65c..e82e2cd 100755 --- a/bin/check-mirrors +++ b/bin/check-mirrors | |||
@@ -94,7 +94,7 @@ for mirror in $mirrors | |||
94 | do | 94 | do |
95 | url="${mirror%/}/timestamp" | 95 | url="${mirror%/}/timestamp" |
96 | 96 | ||
97 | if curl -s -S -O "$url" >'curl.log' 2>&1 | 97 | if curl -s -S -O -m 600 "$url" >'curl.log' 2>&1 |
98 | then | 98 | then |
99 | cmp -s 'expected' 'timestamp' \ | 99 | cmp -s 'expected' 'timestamp' \ |
100 | || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." | 100 | || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." |