source: hybrid/trunk/nanobsd/files/usr/local/sbin/proxy-test.sh@ 10131

Last change on this file since 10131 was 10131, checked in by richardvm, 13 years ago

needed?

File size: 513 bytes
Line 
1#!/bin/sh
2
3PROXY=proxy.wleiden.net:3128
4URL=http://proxy-test.wirelessleiden.nl
5FILE=/tmp/proxy-test.wirelessleiden.nl
6
7# Set proxy to escape the network
8export HTTP_PROXY=${PROXY}
9
10# Fetch the website (curl not installed)
11fetch -o ${FILE} ${URL} 2> /dev/null
12if [ -w ${FILE} ]; then
13 retval=`cat ${FILE}`
14 rm ${FILE}
15fi
16
17# Chech if website returns the expected result
18if [ "$retval" = "1" ]; then
19 echo "WWW OK: Got a www website"
20 exit 0
21else
22 echo "WWW CRITICAL: Unable to fetch www website"
23 exit 2
24fi
25
Note: See TracBrowser for help on using the repository browser.