home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume11 / watcher / part01 / Support / syswatch < prev    next >
Encoding:
Text File  |  1987-09-27  |  286 b   |  13 lines

  1. #! /bin/csh -f
  2. set FILE = /tmp/watch$$
  3. set MAILTO = ( doc )
  4. cd /usr/local/lib/watcher
  5. watcher > $FILE
  6. if (-z $FILE) then
  7.     echo " " | mail -s "`hostname` had no problems at `date`" $MAILTO
  8. else
  9.     mail -s "System problem report for `hostname` at `date`" $MAILTO < $FILE
  10. endif
  11.  
  12. rm -f $FILE
  13.