summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-12-29 12:26:03 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-12-29 12:26:03 (GMT)
commit2a8b57f1858bd57e1f7744612e3e0990a3d4d377 (patch)
treebba97d21630e000e34df83033b83f9116416117a /bin
parent1193b11cbb0ef2af7ebde6ce0db216a8855174f1 (diff)
downloadsite-2a8b57f1858bd57e1f7744612e3e0990a3d4d377.tar.gz
check-mirrors: Add a timeout
Make sure that curl(1) won't hang forever.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/check-mirrors2
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
94do 94do
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'))."