home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.orig.lzh / misc / newswatch < prev    next >
Text File  |  1989-06-27  |  538b  |  29 lines

  1. #! /bin/sh
  2. # newswatch - look for anomalies, notably locks present a long time
  3.  
  4. # =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
  5. . ${NEWSCONFIG-/usr/lib/news/bin/config}
  6.  
  7. PATH=$NEWSCTL/bin:$NEWSBIN/maint:$NEWSBIN:$NEWSPATH ; export PATH
  8. umask $NEWSUMASK
  9.  
  10. if test $# -gt 0
  11. then
  12.     gurus="$*"
  13. else
  14.     gurus="$NEWSMASTER"
  15. fi
  16.  
  17. cd $NEWSCTL
  18.  
  19. locks="`echo LOCK*`"
  20. if test -r watchtime -a " $locks" != " LOCK*"
  21. then
  22.     trouble="`find $locks ! -newer watchtime -print`"
  23.     if test " $trouble" != " "
  24.     then
  25.         ls -ldtr $trouble | mail $gurus
  26.     fi
  27. fi
  28. touch watchtime
  29.