brian
public text v1 · immutable# This script does the dumbest thing possible: If it detects that the
# size of the pages on one of their servers has changed, it sends an
# e-mail. And then it quits running!
# The size of a page that is not a refresh page but could be later is 9497 bytes
# The size of a page that is a refresh page is 5336 bytes
# The size of a page when it can't contact the server is zero
echo "Check tix" > tickets.txt
status=go
while test $status=go;
do
for server in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15;
do
size=`wget --quiet --tries=1 "http://ev${server}.evenue.net/evenue/linkID=rockies-st/se/" -O- | wc -c | tr -d " "`;
echo Server: $server Size: $size
if [ "$size" != 9497 -a "$size" != 5336 -a "$size" != 0 ];then
echo Size doesnt match;
mail -F "your.email@address.com" -s "Check server http://ev${server}.evenue.net/evenue/linkID=rockies-st/se/" < tickets.txt;
status=stop;
fi
done
done