Great Circle Associates Majordomo-Workers
(September 1996)
 

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

Subject: Copy of reply to Jason L Tibbitts III (2/2)
From: bill @ biome . bio . dfo . ca (Bill Silvert)
Date: Fri, 6 Sep 1996 17:05:43 -0300 (ADT)
To: majordomo-workers @ greatcircle . com (Majordomo developers)

Here is a second message I sent Jason -- may apologies for submitting a
sh script, but my perl isn't very good! This is a pretty site-specific
script, but it may inspire some ideas. For example, one could start with
a prototype and run it through a filter to set the defaults.

Keep in mind that I run almost all the lists at this site, so the script
is set up with this in mind.

>BS> One of the neat features of 1.94b1 is config-test -- but why hasn't
>BS> this been released to the MJ-users list (if it has, I apologise for
>BS> missing it, I was off the list for a while)?
>Because it's part of 1.94.  It checks things that weren't around in 1.93.

Even if this can't be modified easily for use with 1.93, a more general
point is that it would be nice to have a suite of tools for Mj
administration, rather than the few notorious documents that we ekeep
hearing about. For example, I've constructed the following script to
automate new list creation, and while it doesn't do a perfect job, it
helps me keep track of everything that needs to be done and simplifies
some of the work. I am sure that this could be much improved by the
development team if there is interest (and probably translated into
perl).

************************************************************************
#!/bin/sh
# Shell script new.list created Wed Dec  1 17:18:19 AST 1993 by sysop
PROG=`basename $0`
OPTIONS=a:o:m:n:p:D
LIST=
CLOSE=no
DIGEST=no
ALIASES=/usr/local/majordomo/Aliases
OWNER=sysop
CFILE=list.owner.info
MANAGER="Bill Silvert"
PASSWORD=xxx
if [ $OPTIONS ]
then
	USAGE="Usage: $PROG [-$OPTIONS] file [...]"
else
	USAGE="Usage: $PROG file [...]"
fi
while getopts h$OPTIONS x
do
	case $x in
	a)	ALIASES=$OPTARG ;;
	c)	CLOSE=yes ;;
	D)	DIGEST=yes ;;
	o)	OWNER=$OPTARG ;;
	m)	MANAGER=$OPTARG ;;
	n)	LABEL=$OPTARG ;;
	p)	PASSWORD=$OPTARG ;;
	h|\?)	echo "$USAGE"
		echo "a	Aliases file, currently $ALIASES"
		echo "D	create a digest too"
		echo "m	Managers name, currently $MANAGER"
		echo "n	Label for list, currently name of list"
		echo "o	Owners Email address, currently $OWNER"
		echo "p	Password, currently $PASSWORD"
		exit 1 ;;
	*)	echo "$USAGE" ; exit 1 ;;
	esac
done
shift `expr $OPTIND - 1`

case $# in
0)	echo "$USAGE" ; exit 2 ;;
*)
	for i
	do
		create $i
		echo $PASSWORD > $i.passwd
		chmod 664 $i $i.passwd
		chown majordom.majordom $i $i.passwd
		LABEL=${LABEL:-`echo $i | tr '[a-z]' '[A-Z]'`}
		cat > $i.info << EOF
< $LABEL mailing list >

This is the $LABEL mailing list, maintained by $MANAGER.
EOF
		cp /dev/null /usr/local/majordomo/Archive/$i
		chmod 666 /usr/local/majordomo/Archive/$i
		mkdir /usr/local/majordomo/Files/$i
		if [ "$OWNER" != "sysop" ]
		then
			sed -e "s/ListName/$i/" -e "s/PassWord/$PASSWORD/" \
				$CFILE | Mail -s Instructions "$OWNER"
		fi
		if [ "$DIGEST" = "yes" ]
		then
			create $i-digest
			echo $PASSWORD > $i-digest.passwd
			chmod 664 $i-digest $i-digest.passwd
			chown majordomo.majordomo $i-digest $i-digest.passwd
			cat > $i-digest.info << EOF
< $LABEL mailing list >

This is the Digest form of the $LABEL mailing list, maintained by $MANAGER.
EOF
			if [ "$OWNER" != "sysop" ]
			then
				sed -e "s/ListName/$i-digest/" \
				    -e "s/PassWord/$PASSWORD/" \
					$CFILE | Mail -s Instructions "$OWNER"
			fi
			cat >> $ALIASES << EOF
#
$i: "|/usr/local/majordomo/wrapper resend -R -l $i -h biome.bio.dfo.ca $i-outgoing"
$i-outgoing: :include:/usr/local/majordomo/Lists/$i,$i-archive,"|/usr/local/majordomo/wrapper digest -r -C -l $i-digest $i-digest-outgoing"
$i-archive: /usr/local/majordomo/Archive/$i
$i-request: "|/usr/local/majordomo/wrapper request-answer $i"
$i-approval: $OWNER
$i-owner: $OWNER
owner-$i: $OWNER
#
$i-digest: "|/usr/local/majordomo/wrapper resend -R -l $i -h biome.bio.dfo.ca $i-digest-outgoing"
$i-digest-outgoing: :include:/usr/local/majordomo/Lists/$i-digest
$i-digest-request: "|/usr/local/majordomo/wrapper request-answer $i-digest"
$i-digest-approval: $OWNER
$i-digest-owner: $OWNER
owner-$i-digest: $OWNER
EOF
			LIST="$i.info $i-digest.info $LIST"
		else
			cat >> $ALIASES << EOF
#
$i: "|/usr/local/majordomo/wrapper resend -l $i $i-outgoing"
$i-outgoing: :include:/usr/local/majordomo/Lists/$i, $i-archive
$i-archive: /usr/local/majordomo/Archive/$i
$i-request: "|/usr/local/majordomo/wrapper request-answer $i"
$i-approval: $OWNER
$i-owner: $OWNER
owner-$i: $OWNER
EOF
			LIST="$i.info $LIST"
		fi
	done
	${EDITOR:-/usr/bin/vi} $LIST ;;
esac
exit 0
# previous resend line was:
#$i: "|/usr/local/majordomo/wrapper resend -R -l $i -f $i -h biome.bio.ns.ca $i-outgoing"
************************************************************************

-- 
Bill Silvert, Habitat Ecology Section, Bedford Institute of Oceanography,
P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2, Tel. (902)426-1577

Indexed By Date Previous: Copy of reply to Jason L Tibbitts III (1/2)
From: bill@biome.bio.dfo.ca (Bill Silvert)
Next: default domain?
From: Joergen Haegg <Jorgen.Hagg@axis.se>
Indexed By Thread Previous: Copy of reply to Jason L Tibbitts III (1/2)
From: bill@biome.bio.dfo.ca (Bill Silvert)
Next: default domain?
From: Joergen Haegg <Jorgen.Hagg@axis.se>

Google
 
Search Internet Search www.greatcircle.com