Check if directory exists

This commit is contained in:
Bob Mottram 2014-09-22 10:56:09 +01:00
parent a099227e49
commit 4d0ca7f26b
1 changed files with 17 additions and 15 deletions

View File

@ -609,6 +609,7 @@ function configure_email {
adduser $MY_USERNAME sasl adduser $MY_USERNAME sasl
addgroup Debian-exim sasl addgroup Debian-exim sasl
/etc/init.d/exim4 restart /etc/init.d/exim4 restart
if [ ! -d /etc/skel/Maildir ]; then
mkdir -m 700 /etc/skel/Maildir mkdir -m 700 /etc/skel/Maildir
mkdir -m 700 /etc/skel/Maildir/Sent mkdir -m 700 /etc/skel/Maildir/Sent
mkdir -m 700 /etc/skel/Maildir/Sent/tmp mkdir -m 700 /etc/skel/Maildir/Sent/tmp
@ -624,6 +625,7 @@ function configure_email {
mkdir -m 700 /etc/skel/Maildir/.learn-ham/tmp mkdir -m 700 /etc/skel/Maildir/.learn-ham/tmp
ln -s /etc/skel/Maildir/.learn-spam /etc/skel/Maildir/spam ln -s /etc/skel/Maildir/.learn-spam /etc/skel/Maildir/spam
ln -s /etc/skel/Maildir/.learn-ham /etc/skel/Maildir/ham ln -s /etc/skel/Maildir/.learn-ham /etc/skel/Maildir/ham
fi
if [ ! -d /home/$MY_USERNAME/Maildir ]; then if [ ! -d /home/$MY_USERNAME/Maildir ]; then
mkdir -m 700 /home/$MY_USERNAME/Maildir mkdir -m 700 /home/$MY_USERNAME/Maildir