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

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

creating trunk based on 9.0

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.