view wundersend @ 7:9a14029b3782

- Wait longer (100msec) for a read, and reduce the number of retries to match. - Print out if we read OK after more than 1 attempt for diagnostic purposes.
author Daniel O'Connor <darius@dons.net.au>
date Thu, 11 Feb 2010 12:47:59 +1030
parents 9dab44dcb331
children
line wrap: on
line source

#!/bin/sh
# $Id: wundersend,v 1.1 2009/11/22 23:33:06 grog Exp $
# Send a report to Wunderground and log if it fails
RESULTFILE=/var/tmp/wunderground.$$
fetch -o $RESULTFILE $1
RESULT=`cat $RESULTFILE`
if [ "$RESULT" != "success" ]; then
  logger "wh1080: Can't send update to Wunderground: $RESULT"
fi
rm $RESULTFILE