1#!/bin/sh
2
3# Call fowsr and upload data to PWS Weather
4
5wsr="fowsr -fs"
6LOG=/var/log/fowsr/pwsweather.log
7ID=$1
8PASSWORD=$2
9
10WGET=http://www.pwsweather.com/pwsupdate/pwsupdate.php
11
12WGET="$WGET?action=updateraw&ID=$ID&PASSWORD=$PASSWORD&softwaretype=fowsr&"
13
14rm -f $LOG
15$wsr
16
17while read line
18do
19  WGET2="$WGET`echo $line`"
20
21  echo $WGET2
22  wget -O /dev/null "$WGET2"
23done < $LOG
24
25