Don't mount if usb is already mounted

This commit is contained in:
Bob Mottram 2014-09-23 19:56:21 +01:00
parent 4779327f75
commit e94545a91a
1 changed files with 56 additions and 54 deletions

View File

@ -150,7 +150,9 @@ function search_for_attached_usb_drive {
return
fi
if [ -d $USB_DRIVE ]; then
if [ ! -d /media/usb ]; then
mount $USB_DRIVE /media/usb
fi
if [ -d /media/usb/Maildir ]; then
echo 'Maildir found on USB drive'
IMPORT_MAILDIR=/media/usb/Maildir