🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #76353

Re: Adding more groups INN

#76353
From: Klaus Alexander Seistrup
Date: Sun, 09 Sep 2007 18:03
50 lines
1977 bytes
Bozweb wrote:

> How can i adding 450 groups ?
> I had a server crash and he is in the trashcan now:-(
> Is there a script for or have i doit by hand?
> Inn-2.4.3 on a ubuntu server
> tia

If you have a newsgroups file, you could use a bash script along 
these lines (you might have to change the shebang line):

#v+

#!/bin/bash3

MESSAGE="Creating new newsgroups"

sudo ctlinnd throttle "${MESSAGE}" || exit 1

while read group desc
do
  echo -n "${group} "
  #
  if grep -q '\(Moderated\)' <<< "${desc}"; then
    flag='m'
  else
    flag='y'
  fi
  #
  echo -n "${flag} ... "
  sudo ctlinnd newgroup "${group}" "${flag}" 2>&1 || :
done

sudo ctlinnd go "${MESSAGE}" || exit 1

exit 0

# eof

#v-

If the script is called newgroups.sh and the newsgroups file is called 
newsgroups.txt, you'd invoke the script as "newgroups.sh <newsgroups.txt".


Cheers,

-- 
Klaus Alexander Seistrup
http://klaus.seistrup.dk/
Technical Details
Message-ID: <fc1cib$ks8$1@minji.szn.dk>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.osn.de!diablo1.news.osn.de!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!not-for-mail
References: <46e42727$0$230$e4fe514c@news.xs4all.nl>

Show Full Headers
Complete Article Headers
Message-ID: <fc1cib$ks8$1@minji.szn.dk>
Subject: Re: Adding more groups INN
Date: Sun, 09 Sep 2007 18:03:55 +0000
From: Klaus Alexander Seistrup <klaus@seistrup.dk>
References: <46e42727$0$230$e4fe514c@news.xs4all.nl>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.osn.de!diablo1.news.osn.de!news2.arglkargh.de!nuzba.szn.dk!pnx.dk!not-for-mail
Newsgroups: news.software.nntp
Organization: SubZeroNet, Copenhagen, Denmark
Lines: 50
NNTP-Posting-Host: localhost
X-Trace: minji.szn.dk 1189361035 21384 ::1 (9 Sep 2007 18:03:55 GMT)
X-Complaints-To: usenet@szn.dk
NNTP-Posting-Date: Sun, 9 Sep 2007 18:03:55 +0000 (UTC)
Mail-Copies-To: nobody
User-Agent: slrn/0.9.8.1pl1 (Debian)