🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #17750

Re: news spool keeps growing

#17750
From: Todd D. Taft
Date: Tue, 13 May 1997 00:00
70 lines
2942 bytes
(Posted & mailed)
In article <powers-0705972004560001@pc13.nwpacifica.net>,
Chuck Powers <powers@nwpacifica.net> wrote:
>In article <R5kc3bu$sit@capefear.cs.unc.edu>, taft@cs.unc.edu (Todd D.
>Taft) wrote:
>I took a look at findmissing.pl and it works great.  Only thing I haven't
>figured out is how to pipe it to fastrm.  Has anyone a nifty shell script
>that does this?

I won't call it nifty, but here's the hack that I threw together one
night.  I use tmp files, rather than straight pipes, so I can look at
what it tried to do later on, if I need to.  I also have hooks in to
mail me if there was a problem.  They probably wouldn't be needed,
except we have a wonderful policy of piping all output from cron
commands to /dev/null....

#!/bin/sh

#Script by Todd D. Taft
#A semi-informative way to purge files from the news spool that don't exist
#in the history file
#Designed to be run from cron, so we mail our errors to the news admin

#06/06/96

NewsAdminMail='news@cs.unc.edu'

PATH=/newslib/bin/unc:/newslib/bin:/usr/ucb:/bin:/usr/local/bin

findmissing.pl 1> /tmp/spoolclean-nohistory.$$ 2> /tmp/spoolclean-findmissing-err.$$

if ( test -s /tmp/spoolclean-findmissing-err.$$ ); then
	mail -s "Errors checking news spool" $NewsAdminMail <<EOT
The spoolclean script had problems determining which articles appeared in
the news spool, but did not have corresponding entries in the news history
file.  The errors reported were:

`cat /tmp/spoolclean-findmissing-err.$$`

Before stopping because of errors, the spoolclean program had identified the
following files to be deleted:

`cat /tmp/spoolclean-nohistory.$$`
EOT
    exit 1
fi

fastrm /news </tmp/spoolclean-nohistory.$$ 1> /tmp/spoolclean-fastrm-err.$$ 2>&1

if ( test -s /tmp/spoolclean-fastrm-err.$$ ); then
	mail -s "Errors cleaning news spool" $NewsAdminMail <<EOT
The spoolclean script had problems removing some files that appeared in
the news spool, but were not contained within the history file.  Please
investigate these problems:

`cat /tmp/spoolclean-fastrm-err.$$`
EOT
fi





-- 
Todd D. Taft                              taft@cs.unc.edu
WWW: http://www.cs.unc.edu/~taft/         todd_taft@unc.edu
U.N.C. Department of Computer Science Facilities Staff

Technical Details
Message-ID: <5lags4$quj@jobe.cs.unc.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
References: <5k9pjc$3uc$1@panther.rmplc.co.uk> <R5kc3bu$sit@capefear.cs.unc.edu> <powers-0705972004560001@pc13.nwpacifica.net>

Show Full Headers
Complete Article Headers
Message-ID: <5lags4$quj@jobe.cs.unc.edu>
Subject: Re: news spool keeps growing
Date: Tue, 13 May 1997 00:00:00 +0000
From: taft@cs.unc.edu (Todd D. Taft)
References: <5k9pjc$3uc$1@panther.rmplc.co.uk> <R5kc3bu$sit@capefear.cs.unc.edu> <powers-0705972004560001@pc13.nwpacifica.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 241421922
Organization: The University of North Carolina at Chapel Hill
Newsgroups: news.software.nntp