#!/bin/sh . /etc/profile >/dev/null mkdir -p /var/log/fowsr /usr/bin/fowsr -w >> /var/noseywx.log 2>&1 \ || fowsr -fw -n/var/wunderground.log >> /var/noseywx.log 2>&1 # Sleep a "random" time from 5-104 secs, # to avoid the nasty APRS spikes from 1000s of NTP-synced WX stations: sleep 5 `cut -c1-2 /proc/sys/kernel/random/boot_id | tr a-f- 0-9` NWURL="https://noseynick.net/wx/wunder2aprs.cgi?MYCALL=$1&MYPASS=$2&LATLON=$3" shift; shift; shift if [ -n "$1" ]; then NWURL="$NWURL&ID=$1&PASSWORD=$2" shift; shift fi # if you want to add a note/shoutout/neighbourhood/village/town/city: if [ -n "$*" ]; then NWURL="$NWURL&NOTE=$*" fi NWURL="$NWURL&`tail -1 /var/wunderground.log`" wget -q -O- `echo "$NWURL" | tr ' ' +` \ | tee -a /var/noseywx.log | logger -t noseywx # Keep 1 previous version. If you prefer to keep an entire history, comment # out these, but then you probably want to rotate logs another way: mv /var/wunderground.log /var/wunderground.last mv /var/noseywx.log /var/noseywx.last