From: megacz Date: Sun, 21 Oct 2007 06:32:08 +0000 (+0000) Subject: uncomment troublesome stuff in create-user X-Git-Url: https://git.hcoop.net/hcoop/scripts.git/commitdiff_plain/527edd8e1a3357f477110491e35733e064c3630f uncomment troublesome stuff in create-user --- diff --git a/create-user b/create-user index 0e999ce..6474841 100755 --- a/create-user +++ b/create-user @@ -206,23 +206,23 @@ if test -f $HOMEPATH/Maildir/shared-maildirs; then # This does not yet seem to be needed, and it triggers an AFS issue, # so I've commented it out --mwolson. # -# NOTIFY=no -# for dir in $HOMEPATH/Maildir/shared-folders/SpamAssassin/*; do -# if ! test -d $dir; then -# NOTIFY=yes -# else -# dest=/var/local/lib/spamd/Maildir/.$(basename $dir) -# if test "$(readlink $dir/shared)" != "$dest"; then -# ln -sf $dest $dir/shared -# fi -# fi -# done -# if test $NOTIFY = yes; then -# # This is probably going overboard, but oh well -# echo "$USER needs assistance on their shared spam dir" | \ -# mail -s "[create-user] $USER needs assistance" \ -# -e -a "From: admins@deleuze.hcoop.net" mwolson_admin -# fi +NOTIFY=no +for dir in $HOMEPATH/Maildir/shared-folders/SpamAssassin/*; do + if ! test -d $dir; then + NOTIFY=yes + else + dest=/var/local/lib/spamd/Maildir/.$(basename $dir) + if test "$(readlink $dir/shared)" != "$dest"; then + ln -sf $dest $dir/shared + fi + fi +done +if test $NOTIFY = yes; then + # This is probably going overboard, but oh well + echo "$USER needs assistance on their shared spam dir" | \ + mail -s "[create-user] $USER needs assistance" \ + -e -a "From: admins@deleuze.hcoop.net" mwolson_admin +fi else maildirmake --add SpamAssassin=/var/local/lib/spamd/Maildir \