From: mmj Date: Fri, 10 Sep 2004 06:04:57 +0000 (+1000) Subject: chown option and a bugfix for mlmmj-make-ml.sh, thanks Ingo Lameter X-Git-Tag: RELEASE_1_1_0~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8121fbc292e174012a568aba14dddfa8d37f7d89;p=thirdparty%2Fmlmmj.git chown option and a bugfix for mlmmj-make-ml.sh, thanks Ingo Lameter --- diff --git a/src/mlmmj-make-ml.sh b/src/mlmmj-make-ml.sh index 83185c25..9e7bc4ff 100755 --- a/src/mlmmj-make-ml.sh +++ b/src/mlmmj-make-ml.sh @@ -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:"