🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #36793

Re: newgroup/rmgroup policies

#36793
From: Brad Knowles
Date: Mon, 19 Apr 1999 00:00
128 lines
4410 bytes
In article <FAGAyw.8Jn@spcuna.spc.edu>, Terry Kennedy
<terry@spcunb.spc.edu> wrote:

>   I use the ISC newsgroups list to synchronize my list of newsgroups (new-
> group/rmgroup/moderation status change/description change) via an external
> utility (at ftp://ftp.new-york.net/pub/util/cnews-local.tar.gz).

    For INN, there is also the "sync-from-isc" script as found on page 196
of _Managing Usenet_ by Spencer & Lawrence, published by O'Reilly &
Assoc.  My slightly modified version of this script is:

#!/bin/sh
# sync-from-isc --- synchronize with the ISC active file
#
# Taken from p. 196 of:
#
#       Managing Usenet
#       by Spencer & Lawrence
#       O'Reilly & Assoc.
#       ISBN 1-56592-198-4
#
# Slight modifications by Brad Knowles <blk@skynet.be>
# on Mon Dec  7 20:11:49 MET 1998

PROG=`basename $0`

# Main directory under which INN runs
MASTERDIR=/usr/local/news

# Some programs we run.  Specified here just in case they're not in your
# path, or other versions are around that you don't trust, or you want to
# give specific options to the named commands.
ACTSYNC="$MASTERDIR/bin/actsync"
GUNZIP='/usr/bin/gunzip'
bash# cat brad.sync-from-isc
#!/bin/sh
# sync-from-isc --- synchronize with the ISC active file
#
# Taken from p. 196 of:
#
#       Managing Usenet
#       by Spencer & Lawrence
#       O'Reilly & Assoc.
#       ISBN 1-56592-198-4
#
# Slight modifications by Brad Knowles <blk@skynet.be>
# on Mon Dec  7 20:11:49 MET 1998

PROG=`basename $0`

# Main directory under which INN runs
MASTERDIR=/usr/local/news

# Some programs we run.  Specified here just in case they're not in your
# path, or other versions are around that you don't trust, or you want to
# give specific options to the named commands.
ACTSYNC="$MASTERDIR/bin/actsync"
GUNZIP='/usr/bin/gunzip'
MV='/bin/mv'
NCFTP='/usr/local/bin/ncftp -d 30 -g 9'
RM='/bin/rm -f'
SHLOCK='/usr/local/news/bin/shlock'

# Directory to store the remote active file
WORKDIR=$MASTERDIR/tmp

# Location of various files & options to actsync
ISC_ACTIVE='ftp://ftp.isc.org/pub/usenet/CONFIG/active.gz'
IGNORE="$MASTERDIR/etc/actsync/actsync.ign.news.isc.org"
MY_ACTIVE="$MASTERDIR/db/active"
TMP_ACTIVE="$MASTERDIR/tmp/active"
OPTIONS="-o x -p 0 -v 4"

# Use locking, to prevent simultaneous runs of this program
LOCK=$WORKDIR/$PROG.lock

cd $WORKDIR

# Remove any old active files
$RM active*

$SHLOCK -p $$ -f $LOCK

if [ ! $? ] ; then
        echo "$PROG: Cannot lock $LOCK; try again later."
        exit 1
fi

# Retrieve ISC's active file with a non-interactive ftp session
# Requires the freely available ncftp program by Mike Gleason

$NCFTP $ISC_ACTIVE

if [ ! $? ] ; then
        echo "$PROG: ncftp $ISC_ACTIVE failed; try again later."
        exit 2
fi

# Decompress it
$GUNZIP active

if [ ! $? ] ; then
        echo "$PROG: gunzip $WORKDIR/active.gz failed; try again later."
        exit 3
fi

echo "Syncing with news.isc.org active file"

# Run actsync with default ignore file
$ACTSYNC -i $IGNORE $OPTIONS $MY_ACTIVE $TMP_ACTIVE
#$ACTSYNC -m $OPTIONS $MY_ACTIVE $TMP_ACTIVE

# Remove the lock and leave the active file with a date/time stamp
$RM $LOCK

NOW=`/usr/bin/date '+%Y%M%d.%H%m%S'`
$MV active active.$NOW.$$

exit 0

-- 
Brad Knowles <brad@shub-internet.org> <http://www.shub-internet.org/brad/>
    <http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0xE38CCEF1>

Are you looking for a news feed from a site in the Freenix Top 130?
If so, contact me via private e-mail for details.

Technical Details
Message-ID: <brad-1904992232530001@brad.techos.skynet.be>
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: <924538377$30351-209.54.165.69_0001@corp.vnews.net> <FAGAyw.8Jn@spcuna.spc.edu>

Show Full Headers
Complete Article Headers
Message-ID: <brad-1904992232530001@brad.techos.skynet.be>
Subject: Re: newgroup/rmgroup policies
Date: Mon, 19 Apr 1999 00:00:00 +0000
From: brad@shub-internet.org (Brad Knowles)
References: <924538377$30351-209.54.165.69_0001@corp.vnews.net> <FAGAyw.8Jn@spcuna.spc.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
X-Deja-AN: 468449193
X-Complaints-To: abuse@skynet.be
X-Trace: news0.skynet.be 924554109 31338 195.238.1.121 (19 Apr 1999 20:35:09 GMT)
Organization: Shub-Internet
X-URL: http://www.shub-internet.org/
NNTP-Posting-Date: 19 Apr 1999 20:35:09 GMT
Newsgroups: news.software.nntp