summaryrefslogtreecommitdiffstats
path: root/bin/check-mirrors
diff options
context:
space:
mode:
Diffstat (limited to 'bin/check-mirrors')
-rwxr-xr-xbin/check-mirrors77
1 files changed, 25 insertions, 52 deletions
diff --git a/bin/check-mirrors b/bin/check-mirrors
index 446e2fd..9048640 100755
--- a/bin/check-mirrors
+++ b/bin/check-mirrors
@@ -13,17 +13,16 @@
13# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 14
15mirrors=' 15mirrors='
16 ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/ 16 https://ftp.fu-berlin.de/unix/network/monitoring-plugins/
17 ftp://ftp.lysator.liu.se/pub/monitoring-plugins/ 17 https://ftp.lysator.liu.se/pub/monitoring-plugins/
18 ftp://ftp.belnet.be/mirror/nagios-plugins.org/ 18 https://ftp.belnet.be/mirror/nagios-plugins.org/
19 ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ 19 https://ftp.cc.uoc.gr/mirrors/monitoring-plugins/
20 ftp://mirrors.fe.up.pt/pub/monitoring-plugins/ 20 https://mirrors.fe.up.pt/pub/monitoring-plugins/
21 ftp://ftp.osuosl.org/pub/monitoring-plugins/ 21 https://ftp2.osuosl.org/pub/monitoring-plugins/
22 ftp://mirror.bytemark.co.uk/monitoring-plugins/ 22 https://mirror.bytemark.co.uk/monitoring-plugins/
23 ftp://mirror.is.co.za/mirror/monitoring-plugins.org/ 23 http://mirror.mephi.ru/nagios-plugins/
24 ftp://mirror.webtastix.net/monitoring-plugins/ 24 https://ftp.kaist.ac.kr/nagios-plugins/
25 ftp://mirror.mephi.ru/nagios-plugins/ 25 https://mirrors.ustc.edu.cn/monitoring-plugins/
26 ftp://ftp.kaist.ac.kr/nagios-plugins/
27' 26'
28 27
29# 28#
@@ -33,6 +32,8 @@ mirrors='
33# 32#
34# URLs: 33# URLs:
35# - ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/ 34# - ftp://ftp.fu-berlin.de/unix/network/monitoring-plugins/
35# - http://ftp.fu-berlin.de/unix/network/monitoring-plugins/
36# - https://ftp.fu-berlin.de/unix/network/monitoring-plugins/
36# 37#
37# Features: 38# Features:
38# - IPv4 39# - IPv4
@@ -71,7 +72,8 @@ mirrors='
71# 72#
72# URLs: 73# URLs:
73# - ftp://ftp.belnet.be/mirror/nagios-plugins.org/ 74# - ftp://ftp.belnet.be/mirror/nagios-plugins.org/
74# - http://ftp.belnet.be/nagios-plugins.org/ 75# - http://ftp.belnet.be/mirror/nagios-plugins.org/
76# - https://ftp.belnet.be/mirror/nagios-plugins.org/
75# 77#
76# Features: 78# Features:
77# - IPv4 79# - IPv4
@@ -89,9 +91,11 @@ mirrors='
89# URLs: 91# URLs:
90# - ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ 92# - ftp://ftp.cc.uoc.gr/mirrors/monitoring-plugins/
91# - http://ftp.cc.uoc.gr/mirrors/monitoring-plugins/ 93# - http://ftp.cc.uoc.gr/mirrors/monitoring-plugins/
94# - https://ftp.cc.uoc.gr/mirrors/monitoring-plugins/
92# 95#
93# Features: 96# Features:
94# - IPv4 97# - IPv4
98# - IPv6
95# - Updated daily 99# - Updated daily
96# 100#
97# Contacts: 101# Contacts:
@@ -106,6 +110,7 @@ mirrors='
106# URLs: 110# URLs:
107# - ftp://mirrors.fe.up.pt/pub/monitoring-plugins/ 111# - ftp://mirrors.fe.up.pt/pub/monitoring-plugins/
108# - http://mirrors.fe.up.pt/pub/monitoring-plugins/ 112# - http://mirrors.fe.up.pt/pub/monitoring-plugins/
113# - https://mirrors.fe.up.pt/pub/monitoring-plugins/
109# 114#
110# Features: 115# Features:
111# - IPv4 116# - IPv4
@@ -122,8 +127,8 @@ mirrors='
122# UNITED STATES 127# UNITED STATES
123# 128#
124# URLs: 129# URLs:
125# - ftp://ftp.osuosl.org/pub/monitoring-plugins/ 130# - http://ftp2.osuosl.org/pub/monitoring-plugins/
126# - http://ftp.osuosl.org/pub/monitoring-plugins/ 131# - https://ftp2.osuosl.org/pub/monitoring-plugins/
127# 132#
128# Features: 133# Features:
129# - IPv4 134# - IPv4
@@ -140,9 +145,8 @@ mirrors='
140# UNITED KINGDOM 145# UNITED KINGDOM
141# 146#
142# URLs: 147# URLs:
143# - ftp://mirror.bytemark.co.uk/monitoring-plugins/
144# - http://mirror.bytemark.co.uk/monitoring-plugins/ 148# - http://mirror.bytemark.co.uk/monitoring-plugins/
145# - rsync://mirror.bytemark.co.uk/monitoring-plugins/ (currently not available) 149# - https://mirror.bytemark.co.uk/monitoring-plugins/
146# 150#
147# Features: 151# Features:
148# - IPv4 152# - IPv4
@@ -155,40 +159,6 @@ mirrors='
155# Home page: 159# Home page:
156# - http://www.bytemark.co.uk/ 160# - http://www.bytemark.co.uk/
157# 161#
158# SOUTH AFRICA
159#
160# URLs:
161# - ftp://mirror.is.co.za/mirror/monitoring-plugins.org/
162# - http://mirror.is.co.za/mirror/monitoring-plugins.org/
163# - rsync://mirror.is.co.za/mirror/monitoring-plugins.org/
164#
165# Features:
166# - IPv4
167# - Updated twice a day
168#
169# Contacts:
170# - Henti Smith <ftpadmin AT is.co.za>
171#
172# Home page:
173# - http://www.is.co.za/
174#
175# NEW ZEALAND
176#
177# URLs:
178# - ftp://mirror.webtastix.net/monitoring-plugins/
179# - http://mirror.webtastix.net/monitoring-plugins/
180#
181# Features:
182# - IPv4
183# - Updated hourly
184#
185# Contacts:
186# - Mirror Admins <mirrors AT webtastix.net>
187# - Shane Langley <shane AT webtastix.net>
188#
189# Home page:
190# - http://www.webtastix.net/
191#
192# RUSSIA 162# RUSSIA
193# 163#
194# URLs: 164# URLs:
@@ -213,9 +183,11 @@ mirrors='
213# URLs: 183# URLs:
214# - ftp://ftp.kaist.ac.kr/nagios-plugins/ 184# - ftp://ftp.kaist.ac.kr/nagios-plugins/
215# - http://ftp.kaist.ac.kr/nagios-plugins/ 185# - http://ftp.kaist.ac.kr/nagios-plugins/
186# - https://ftp.kaist.ac.kr/nagios-plugins/
216# 187#
217# Features: 188# Features:
218# - IPv4 189# - IPv4
190# - IPv6
219# - Updated daily 191# - Updated daily
220# 192#
221# Contacts: 193# Contacts:
@@ -229,6 +201,7 @@ mirrors='
229# 201#
230# URLs: 202# URLs:
231# - http://mirrors.ustc.edu.cn/monitoring-plugins/ 203# - http://mirrors.ustc.edu.cn/monitoring-plugins/
204# - https://mirrors.ustc.edu.cn/monitoring-plugins/
232# - rsync://mirrors.ustc.edu.cn/monitoring-plugins/ 205# - rsync://mirrors.ustc.edu.cn/monitoring-plugins/
233# 206#
234# Features: 207# Features:
@@ -263,12 +236,12 @@ for mirror in $mirrors
263do 236do
264 url="${mirror%/}/timestamp" 237 url="${mirror%/}/timestamp"
265 238
266 if ncftpget -V -t 600 "$url" >'ftp.log' 2>&1 239 if curl -fsSLO -m 600 "$url" >'http.log' 2>&1
267 then 240 then
268 cmp -s 'expected' 'timestamp' \ 241 cmp -s 'expected' 'timestamp' \
269 || echo >&2 "$mirror is outdated ($(cat 'timestamp'))." 242 || echo >&2 "$mirror is outdated ($(cat 'timestamp'))."
270 else 243 else
271 tail -n 1 'ftp.log' >&2 244 printf '%s failed: %s\n' "$mirror" "$(tail -n 1 'http.log')" >&2
272 fi 245 fi
273 rm -f 'timestamp' 246 rm -f 'timestamp'
274done 247done