Here's a script to do a writeconfig for every list, ie. after upgrading
majordomo. Trivial to write, but it might be useful to someone.
#!/usr/local/bin/perl
#
# write configs for all lists. Useful after an upgrade.
# Morty Abzug <morty@sled.gsfc.nasa.gov>, 19971230
#
require "/usr/local/majordomo/majordomo.cf";
open (STDOUT, "|${sendmail_command} ${whoami}");
print <<"EOF";
From: ${whoami_owner}
To: majordomo
Subject: writeconfigs
EOF
chdir $listdir || die "Unable to change to list dir: $!";
@listconfigs=glob("*.config");
list:
foreach(@listconfigs) {
$listname=$_;
$listname=~s{\.config$}{};
next if $listname =~ m{\.};
next if ! -f $listname;
open (CONFIG, "<$_") || warn "Unable to open config for $_";
while (<CONFIG>) {
if (m{admin_passwd\s*=\s*(.*)$}) {
print "writeconfig $listname $1\n";
next list;
}
}
}
print "end\n";
--
Mordechai Abzug Hughes STX morty@sled.gsfc.nasa.gov
Unix Administrator NASA Goddard Space Flight Center Code 542
CNE 301.286.8787
|
|