🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #36953

Re: INN 2.2 - Making large changes to active file

#36953
From: Brad Knowles
Date: Thu, 22 Apr 1999 00:00
63 lines
2749 bytes
In article <371CB0A4.2B8ADA99@acp.org>, David Spigelman <dspigelm@acp.org>
wrote:

> I want to make some big changes to my active file, removing several
> hundred groups. How do I do this?

    You can do this two ways:

        1.  Stop the news server, edit the file, restart the news server.

        2.  Feed the newsgroups to ctlinnd, but make sure that you sleep
something like four seconds between calls to this program, to give INN a
chance to keep up.


    I've got a little script (which I call "rmgroups) that I threw
together to help me do #2 (see below).  You use it like so:

        # cd /usr/local/tmp
        # cat newsgroups.to.be.removed | /usr/local/news/bin/rmgroups


    Of course, I always make sure that my input to this program has been
sorted and uniq'ed, so that I don't try to remove the same newsgroup more
than once (and so I've got some sort of idea how far it's gotten along in
the process).

    Finally, note that this program doesn't do any sanity checking on it's
input, so you can seriously screw yourself up if you aren't careful.



#!/bin/sh
#
# rmgroups -- read from stdin a list of newsgroups to be
#           handed to ctlinnd to be removed
#
# Author: Brad Knowles <brad@shub-internet.org>
#   Date: Thu Apr 15 10:33:06 MET DST 1999
#
# This program is provided without any warranty whatsoever.
# USE AT YOUR OWN RISK!!!
 
read INPUT
if [ $? -eq 0 ] ; then
        while [ $? -eq 0 ]
        do
                echo -n "Removing $INPUT...  "
                /usr/local/news/bin/ctlinnd rmgroup $INPUT
                sleep 4
                read INPUT
        done
fi
echo "All rmgroups done.  Exiting...."

-- 
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-2204991102130001@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: <371CB0A4.2B8ADA99@acp.org>

Show Full Headers
Complete Article Headers
Message-ID: <brad-2204991102130001@brad.techos.skynet.be>
Subject: Re: INN 2.2 - Making large changes to active file
Date: Thu, 22 Apr 1999 00:00:00 +0000
From: brad@shub-internet.org (Brad Knowles)
References: <371CB0A4.2B8ADA99@acp.org>
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: 469480059
X-Complaints-To: abuse@skynet.be
X-Trace: news1.skynet.be 924771732 18855 195.238.1.121 (22 Apr 1999 09:02:12 GMT)
Organization: Shub-Internet
X-URL: http://www.shub-internet.org/
NNTP-Posting-Date: 22 Apr 1999 09:02:12 GMT
Newsgroups: news.software.nntp