Jump to content

Obsolete:Squid checker

From Wikitech
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page contains historical information. It may be outdated or unreliable.
2005
#!/bin/bash
for center in pmtpa lopar knams yaseo
do
  echo "Checking $center squids:"
  for addr in `host rr.$center.wikimedia.org | cut -f 4 -d ' '`
  do
    echo -n "$addr "
    http_proxy=http://$addr:80 \
      wget --quiet -O /dev/null \
      http://en.wikipedia.org/robots.txt \
      && echo "ok" || echo "FAIL"
  done
done