#! /bin/sh
##  $Revision: 1.15 $
##  Watch the state of the system relative to the news subsystem.
##  As controlled by the control file, when space or inodes are almost
##  exhausted innd is throttled, or paused, similarly if the load is
##  too high - when conditions revert to normal, innd is restarted.
##  No logging is done here, watch for syslog reports from innd.
##  Written by Mike Cooper <mcooper@usc.edu>.
##  Extensively modified by <kre@munnari.oz.au>.
##  Watch a log file and send mail when it gets new output by
##	Steve Groom <stevo@elroy.Jpl.Nasa.Gov>
##  Steve's extensions merged in innwatch by
##	<Christophe.Wolfhugel@grasp.insa-lyon.fr>

##  =()<. @<_PATH_SHELLVARS>@>()=
. /usr/lib/news/innshellvars

PROGNAME=innwatch
LOCK=${LOCKS}/LOCK.${PROGNAME}
DAILY=${LOCKS}/LOCK.news.daily
##  Where to put the timestamp file (directory and filename).
TIMESTAMP=${LOCKS}/${PROGNAME}.time

##  Logfile to watch. Comment out if no logwatch.
LOGFILE=${MOST_LOGS}/news.crit

CTLINND_TMOUT=300

##  Parse JCL.
whi                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            