home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume27 / mthreads / part01 / mt.check.SH < prev    next >
Encoding:
Text File  |  1993-11-20  |  1.3 KB  |  57 lines

  1. case $CONFIG in
  2.     '') . ./config.sh ;;
  3. esac
  4. echo "Extracting mt.check (with variable substitutions)"
  5. set `cat patchlevel.h`
  6. version=$4
  7. $spitshell >mt.check <<!GROK!THIS!
  8. $startsh
  9. # $Id: mt.check.SH,v 3.0 1993/09/22 04:11:10 davison Trn $
  10. #
  11. # mt.check - daily maintenance for mt.log
  12. #
  13. # Check mt.log for earth-shattering errors, and mail them to \$gurus if found.
  14. # Then move the mt.log file into a week-long history chain.
  15. #
  16. # Usage: mt.check
  17. #
  18.  
  19. gurus="$newsadmin"
  20. tmp="/tmp/mt.c\$\$"
  21.  
  22. PATH=/bin:/usr/bin
  23. export PATH
  24.  
  25. umask 002
  26.  
  27. trap "rm -f \$tmp ; exit 0" 0 1 2 15
  28.  
  29. cd $privlib
  30.  
  31. $egrep " \\*\\*\$" mt.log >\$tmp
  32.  
  33. if test -s \$tmp ; then
  34.     (cat <<EOT
  35. To: \$gurus
  36. Subject: mthreads error!
  37.  
  38. The following errors were reported in mt.log.  If the error pertains to
  39. the active file,  you should lock down your news system and fix it.  If
  40. it is a thread-releated bug and it persists, please report this fact to
  41. Wayne Davison (davison@borland.com).  Mention version "$version".
  42.  
  43. EOT
  44.     cat \$tmp) | mail \$gurus
  45. fi
  46.  
  47. test -f mt.log.6 && mv mt.log.6 mt.log.7
  48. test -f mt.log.5 && mv mt.log.5 mt.log.6
  49. test -f mt.log.4 && mv mt.log.4 mt.log.5
  50. test -f mt.log.3 && mv mt.log.3 mt.log.4
  51. test -f mt.log.2 && mv mt.log.2 mt.log.3
  52. test -f mt.log   && mv mt.log   mt.log.2
  53. touch mt.log
  54.  
  55. exit 0
  56. !GROK!THIS!
  57.