From c81b7f986867db292d62a1757123723b5ef66518 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Wed, 12 Dec 2001 19:52:40 +0000 Subject: Initial revision --- init-mailmanarchive | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 init-mailmanarchive (limited to 'init-mailmanarchive') diff --git a/init-mailmanarchive b/init-mailmanarchive new file mode 100755 index 0000000..edcc240 --- /dev/null +++ b/init-mailmanarchive @@ -0,0 +1,28 @@ +#!/bin/bash + +bindir="/usr/lib/mailman/bin" +basedir="/var/lib/mailman/archives/private" + +[ $# == 0 ] && echo "Usage: `basename $0` [...]" + +for list in $@; do + mboxdir="$basedir/$list.mbox" + mboxfile="$mboxdir/$list.mbox" + htmldir="$basedir/$list" + + if [ "x$1" != "" -a -d $mboxdir ]; then + echo "Renewing list \"$list\"..." + + # Make sure the mbox file exists even if no mails are archived yet + touch $mboxfile && chown list.list $mboxfile && chmod 664 $mboxfile + rm -rf $htmldir + +# $bindir/arch $list + mkdir -p $htmldir && chown list.list $htmldir && chmod 2755 $htmldir + su list "mhonarc -outdir $htmldir -idxfname index.html -rcfile /etc/mailman/mhonarc.mrc -title \"$list Archive (by Date)\" -ttitle \"$list Archive (Threaded)\" $mboxfile" + + echo "Done with list \"$list\"!" + else + echo "Problem renewing list \"$list\"." + fi +done -- cgit v1.2.3