Subject: Developers of Sympa
List archive
- From: "Xavier RENAUT" <address@concealed>
- Cc: address@concealed
- Subject: [sympa-dev] little tool in dev, adding lists
- Date: Fri, 14 Jan 2000 17:12:16 +0100 (MET)
Hi !
here is a little tool.
in devlpt.
you have to be root to use it.
it adds aliases,
the configuration file,
and you have to edit some lines in the topof the script.
I will add curses and tk interface.
bye
Xavier
______________
address@concealed
#!/usr/bin/perl -w
#
# newlist.pl
# Copyright (c) 2000 xavier renaut
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA
#$SYMPA="/usr/local/sympa/sympa";
$SYMPA=".";
#$ALIASES="/etc/aliases";
$ALIASES="aliases";
$LISTMASTER="xrenaut\@risc.fr";
sub getconf {
print "nomliste : ";
$nomliste=<>;
%list=("subject","","visibility","","custom_subject","","send","","reply_to","","subscribe","","unsubscribe","","review","","email","");
foreach (keys %list)
{
print "$_ : ";
$list{$_}=<>;
}
}
sub printaliases
{
chomp $nomliste;
open(ALI,">> $ALIASES");
$DATES=`date`;
chomp $DATES;
print ALI<<EOF;
#
# added by newlist.sh at $DATES ajout for list "$nomliste" ------------
#
$nomliste: "|$SYMPA/bin/queue $nomliste"
$nomliste-request: "|$SYMPA/bin/queue $nomliste-request"
$nomliste-unsubscribe: "|$SYMPA/bin/queue $nomliste-unsubscribe"
$nomliste-owner: listmaster
#
EOF
close ALI;
}
sub printconf
{
print "writing aliases\n";
&printaliases;
print "updating aliases";
system 'newaliases'; # || die "yo ! can't update aliases $!" ;
print ".\n";
chomp $nomliste;
mkdir "$SYMPA/expl/$nomliste",0700 || die "yo ! can't create
$SYMPA/expl/$nomliste/ $!";
open (CONF,">> $SYMPA/expl/$nomliste/config") || die "yo ! can't open
$SYMPA/expl/$nomliste/config $!";
`chown sympa.sympa $SYMPA/expl/$nomliste`;
`chown sympa.sympa $SYMPA/expl/$nomliste/config`;
open (STATS,">> $SYMPA/expl/$nomliste/stats");
`chown sympa.sympa $SYMPA/expl/$nomliste/stats`;
close STATS;
print "Configuration:\n";
foreach (keys %list)
{
if ($_ =~/email/)
{
print "owner\n";
print CONF "owner\n";
}
print "$_ $list{$_}";
print CONF "$_ $list{$_}\n\n";
}
print CONF<<EOT;
archive
period week
access owner
web_archive
access owner
user_data_source database
EOT
print CONF "\nowner\nemail $LISTMASTER\n";
close CONF;
}
sub printalias
{
open (ALIAS,">> $ALIASES");
close ALIAS;
}
sub main {
&getconf;
&printalias;
&printconf;
}
&main;
-
[sympa-dev] Anonymous posting,
Richard Balint, 01/05/2000
-
Re: [sympa-dev] Anonymous posting,
Aumont - Comite Reseaux des Universites, 01/06/2000
-
Re: [sympa-dev] Anonymous posting,
Dominique ROUSSEAU, 01/06/2000
-
Re: [sympa-dev] Anonymous posting,
Richard Balint, 01/10/2000
- [sympa-dev] little tool in dev, adding lists, Xavier RENAUT, 01/14/2000
-
Re: [sympa-dev] Anonymous posting,
Richard Balint, 01/10/2000
-
Re: [sympa-dev] Anonymous posting,
Dominique ROUSSEAU, 01/06/2000
-
Re: [sympa-dev] Anonymous posting,
Aumont - Comite Reseaux des Universites, 01/06/2000
Archive powered by MHonArc 2.6.19+.