#!/bin/sh
##
## wxnewspost
##
## wxd support script
## This script accepts AFOS messages on its standard input, and posts them
## to the appropriate newsgroup

#
# usage:
#   wxnewspost <newsgroup> <Subject of article>
# Example:
#   wxnewspost ampr.ia.wx "Significant Weather Outlook"
#
#
ORGANIZATION="NWS Skywarn"
FROMADDRESS="Skywarn Weather Daemon"
REPLYTOADDRESS=$LOGNAME
PATHPREFIX=wxdaemon
CLEANUPTOOL=/usr/sbin/wxclean

test -f /etc/wxd/identity || . /etc/wxd/identity
# 

$CLEANUPTOOL | 
inews -t"$2" -n"$1" -f"$FROMADDRESS" -o"$ORGANIZATION" -r"$REPLYTOADDRESS" -x"$PATHPREFIX" 
