Great Circle Associates Majordomo-Workers
(December 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: writeconfigs
From: "Mordechai T. Abzug" <morty @ frakir . gsfc . nasa . gov>
Date: Tue, 30 Dec 1997 12:19:50 -0500 (EST)
To: majordomo-workers @ greatcircle . com


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

Indexed By Date Previous: Re: MIME-Tools and other stuff
From: Brock Rozen <brozen@torah.org>
Next:
From: (nil)
Indexed By Thread Previous: Re: Single archive and -l option bug (one more time)
From: Dave Wolfe <dwolfe@risc.sps.mot.com>
Next:
From: (nil)

Google
 
Search Internet Search www.greatcircle.com