Here is the scipt we use. However, you will want to be carful in using it
because it uses a couple of home grown patches that put our list of lists
and info files out on a publically accible web page.
Hope this helps!
Joseph Terrell
SVIN Listmaster
#!/usr/bin/perl4.036
$listdir = "/usr/local/majordomo/lists";
$archdir = "/usr/local/majordomo/archives";
$webdir = "/home/httpd/htdocs/svin/list";
$MJALIASES = "/etc/aliases.lists";
$ARCHDEF = "arch";
$ADVERTDEF = "advert";
#if ($ENV{'USER'} ne "majordom") {
# print "This must be run by the id majordom\n";
# exit;
# }
if (! @ARGV[0]) {die "Usage:\n addlist listname owner-email-addr password
arch\|noarch advert\|noadvert\n\nie: addlist test-l user@domain.org topsecret arch noadvert\n"};
if (! @ARGV[1]) {die "need email address of the new list owner\n";}
if (! @ARGV[2]) {
$passwd = "123456";
print "The password will be 123456\n";
}
else {
$passwd = @ARGV[2];
}
if (@ARGV[3] ne "arch" && @ARGV[3] ne "noarch") {
die "4th parm must be arch or noarch for archiving status.\n";
}
else {
$archive = @ARGV[3];
}
if (@ARGV[4] ne "advert" && @ARGV[4] ne "noadvert") {
die "5th parm must be advert or noadvert for advertising status.\n";
}
else {
$advert = @ARGV[4];
}
$newlist = @ARGV[0];
`touch $listdir/$newlist`;
`chmod 664 $listdir/$newlist`;
`touch $listdir/$newlist.info`;
`chmod 664 $listdir/$newlist.info`;
`echo $passwd > $listdir/$newlist.passwd`;
`chmod 660 $listdir/$newlist.passwd`;
if ($archive eq "arch") {
`mkdir $archdir/$newlist`;
`chmod 775 $archdir/$newlist`;
}
`sed -e "s/_name_of_list_/$newlist/g; s/_password_of_list_/$passwd/g" < /usr/local/majordomo/list-owner-info | mail -s "Your new mailing list" @ARGV[1]`;
`sed -e "s/_name_of_list_/$newlist/g; s/_owner_of_list_/@ARGV[1]/g" < /usr/local/majordomo/std-aliases-$archive >> $MJALIASES`;
`echo "approve $passwd subscribe $newlist @ARGV[1]" | mail majordomo`;
# `echo "approve <> subscribe <> @ARGV[1]" | mail majordomo`;
# --subscribe owner to own list and list-owners list
`newaliases`;
# SinnFree-specific stuff to put list info on the web pages
if ($advert eq "advert") {
`echo "(New list)" >$webdir/$newlist.info`;
`grep -v ">$newlist</a>" $webdir/listdesc.html >$webdir/listdesc.new`;
`echo "<dt><a href=\"$newlist.info\">$newlist</a><dd>(new list)" >>$webdir/listdesc.new`;
`sort $webdir/listdesc.new >$webdir/listdesc.html`;
`rm $webdir/listdesc.new`;
}
On Mon, 17 Feb 1997, Jeff Wasilko wrote:
> I've seen some scripts pass by for automatically setting up a new
> list and I thought I saved them, but I can't find them now...
>
> So, does anyone have a script they use to set up new lists?
>
> Thanks,
>
> -Jeff
>
References:
|
|