diff --git a/src/freedombone-backup-local b/src/freedombone-backup-local index 7710425e..be242ab8 100755 --- a/src/freedombone-backup-local +++ b/src/freedombone-backup-local @@ -356,11 +356,15 @@ function backup_users { # Backup email if [ -d /home/$USERNAME/Maildir ]; then + echo $"Stopping mail server" + systemctl stop exim4 echo $"Creating an email archive for $USERNAME" if [ ! -d /root/tempbackupemail/$USERNAME ]; then mkdir -p /root/tempbackupemail/$USERNAME fi tar -czvf /root/tempbackupemail/$USERNAME/maildir.tar.gz /home/$USERNAME/Maildir + echo $"Restarting mail server" + systemctl start exim4 echo $"Backing up emails for $USERNAME" backup_directory_to_usb /root/tempbackupemail/$USERNAME mail/$USERNAME fi diff --git a/src/freedombone-backup-remote b/src/freedombone-backup-remote index 1b62d300..58759dca 100755 --- a/src/freedombone-backup-remote +++ b/src/freedombone-backup-remote @@ -283,11 +283,15 @@ function backup_users { # email if [ -d /home/$USERNAME/Maildir ]; then + echo $"Stopping mail server" + systemctl stop exim4 echo $"Creating an email archive" if [ ! -d /root/backupemail/$USERNAME ]; then mkdir -p /root/backupemail/$USERNAME fi tar -czvf /root/backupemail/$USERNAME/maildir.tar.gz /home/$USERNAME/Maildir + echo $"Restarting mail server" + systemctl start exim4 echo $"Backing up emails for $USERNAME" backup_directory_to_friend /root/backupemail/$USERNAME mail/$USERNAME fi