🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #37697

Re: actsync usage

#37697
From: Brad Knowles
Date: Fri, 28 May 1999 00:00
146 lines
4598 bytes
In article <slrn7kri2e.54k.lambert@techbsd.csw.net>, lambert@cswnet.com wrote:

> Is there some way to have actsync not add missing groups but also remove old
> groups for a hierarchy?  In my case I don't want any of the porn or warez 
> groups from alt.*.  I would however, like to have the ability to allow 
> actsync to get rid of groups that are not in the active file from ftp.isc.org.
> 
> I spend some time reading the man page for actsync but didn't see how I could 
> make that work from the availible options.

    Just create an /usr/local/news/etc/actsync/actsync.news.isc.org file
that looks something like this:

# $Id: actsync.ign,v 1.1.1.1 1997/08/04 04:03:48 gpalmer Exp $
#
# Sample actsync ignore_file.

# For now by default do not sync
#
i *

# sync on the 8 majors + alt
#
c comp.*
c gnu.*
c misc.*
c news.*
c rec.*
c sci.*
c soc.*
c talk.*

# don't compare to.* groups as they will differ
#
i to.*
i alt.binaries.pictures.pictures.erotica*
i *warez*

# we always want our special top level groups
#
i control
i general
i junk
i test
i to


    And then run the "sync-from-isc" script as provided on page 196 of
_Managing Usenet_ by Spencer & Lawrence, published by O'Reilly & Assoc. 
I've created my own slightly hacked version of that script, although you
could optionally add another run of actsync with a -m option to simply add
in the newsgroups they have without deleting any of your existing
newsgroups:

#!/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

# 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-2805991132190001@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: <slrn7kri2e.54k.lambert@techbsd.csw.net>

Show Full Headers
Complete Article Headers
Message-ID: <brad-2805991132190001@brad.techos.skynet.be>
Subject: Re: actsync usage
Date: Fri, 28 May 1999 00:00:00 +0000
From: brad@shub-internet.org (Brad Knowles)
References: <slrn7kri2e.54k.lambert@techbsd.csw.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: 483053194
X-Complaints-To: abuse@skynet.be
X-Trace: news0.skynet.be 927883881 31231 195.238.1.121 (28 May 1999 09:31:21 GMT)
Organization: Shub-Internet
X-URL: http://www.shub-internet.org/
NNTP-Posting-Date: 28 May 1999 09:31:21 GMT
Newsgroups: news.software.nntp