Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site waldo.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!seismo!lll-crg!dual!waldo!broome From: broome@waldo.UUCP (Jonathan C. Broome) Newsgroups: net.news.adm,net.news.sa Subject: All these newgroup messages !!! Message-ID: <18@waldo.UUCP> Date: Mon, 25-Nov-85 10:03:33 EST Article-I.D.: waldo.18 Posted: Mon Nov 25 10:03:33 1985 Date-Received: Wed, 27-Nov-85 05:39:46 EST Organization: What organization? Us? Naw... Lines: 63 Keywords: Argh ... (and a solution) Xref: watmath net.news.adm:441 net.news.sa:213 [burp] We just got clobbered with 35 newgroup messages from that new site! Argh! Well, as has bee said before, it *is* possible to create new newsgroups locally without using inews -C and blasting the rest of the world. This is a shell script that we use around here that I hope may be useful to someone else out there... It's a _csh_ script (sorry folks w/o csh), and may need some tuning for your site, but it should be simple enough. --- Jonathan Broome ...!dual!waldo!{usenet,broome} ==== cut here ==== cut here ==== cut here ==== cut here ==== cut here ==== #! /bin/csh # # A quick shell script to add new newsgroups without inews -C # It even tries to make any of the needed upper-level directories ... # It assumes that the group is to be postable. # set newsuser = news set newsgrp = news # may be "daemon" at your site set libdir = /usr/lib/news # usually ~${newsuser} set active = ${libdir}/active set spooldir = /usr/spool/news set mode = 755 # Some people have them mode 777 ... set name = $0 # Just the name of this script. if ($#argv < 1) then echo Usage: $name:t group \[ group ... \] exit 1 endif cp $active ${active}.old # Just in case !!! foreach group ( $* ) echo Adding group $group ... # Now to make sure all the directories exist ... set dirparts = ( `echo $group | sed 's;\.; ;g'` ) set dir = $spooldir foreach part ( $dirparts ) set dir = ${dir}/${part} if (! -e $dir) then echo Making directory $dir /bin/mkdir $dir chown $newsuser $dir chgrp $newsgrp $dir chmod $mode $dir endif end # And add to the active file ... echo "$group 00000 00000 y" >> $active end echo All done ... exit 0