changeset 330:ec0409ae1dcb

chown option and a bugfix for mlmmj-make-ml.sh, thanks Ingo Lameter
author mmj
date Fri, 10 Sep 2004 16:04:57 +1000
parents fa4e4c0220a2
children 811023bfbc1e
files src/mlmmj-make-ml.sh
diffstat 1 files changed, 26 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/mlmmj-make-ml.sh	Thu Sep 09 19:25:20 2004 +1000
+++ b/src/mlmmj-make-ml.sh	Fri Sep 10 16:04:57 2004 +1000
@@ -13,9 +13,10 @@
 -L	the name of the mailinglist
 -s	your spool directory if not "$DEFAULTDIR"
 -a	create the needed entrys in your /etc/aliases file
--z	nuffn for now"
+-z	nuffn for now
+-c	chown the spool dir"
 
-while getopts ":hL:s:az" Option
+while getopts ":hL:s:azc:" Option
 do
 case "$Option" in 
 	h )
@@ -35,6 +36,10 @@
 	a )
 	A_CREATE="YES"
 	;;
+	c )
+	DO_CHOWN=1
+	CHOWN="$OPTARG"
+	;;
 	* )
 	echo -e "$0: invalid option\nTry $0 -h for more information."
 	exit 1
@@ -101,7 +106,7 @@
 fi
 
 MLMMJMAINTD=`which mlmmj-maintd 2>/dev/null`
-if [ -z "$MLMMJRECIEVE" ]; then
+if [ -z "$MLMMJMAINTD" ]; then
 	MLMMJMAINTD="/path/to/mlmmj-maintd"
 fi
 
@@ -129,6 +134,24 @@
 	echo "Don't forget to add this to /etc/aliases:"
 	echo "$ALIAS"
 fi
+
+if [ "$DO_CHOWN" ] ; then
+	echo
+	echo -n "chown -R $CHOWN $SPOOLDIR/$LISTNAME? [y/n]: "
+	read OKIDOKI
+	case $OKIDOKI in
+		y|Y)
+			chown -R $CHOWN $SPOOLDIR/$LISTNAME
+		;;
+		n|N)
+			exit 0
+		;;
+		*)
+			echo "option is: y, Y, n, N"
+		;;
+	esac
+fi
+
 echo
 echo "If you're not starting mlmmj-maintd in daemon mode,"
 echo "don't forget to add this to your crontab:"