]> git.ipfire.org Git - thirdparty/mlmmj.git/commitdiff
chown option and a bugfix for mlmmj-make-ml.sh, thanks Ingo Lameter
authormmj <none@none>
Fri, 10 Sep 2004 06:04:57 +0000 (16:04 +1000)
committermmj <none@none>
Fri, 10 Sep 2004 06:04:57 +0000 (16:04 +1000)
src/mlmmj-make-ml.sh

index 83185c25354c2c149ea7b40538cf12cf46713adf..9e7bc4ff7c53b147735d524fcc87683ffcf59505 100755 (executable)
@@ -13,9 +13,10 @@ USAGE="mlmmj-make-ml "$VERSION"
 -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 @@ case "$Option" in
        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 @@ if [ -z "$MLMMJRECIEVE" ]; then
 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 @@ else
        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:"