|
@@ -320,20 +320,21 @@ function restore_mutt_settings {
|
320
|
320
|
${PROJECT_NAME}-adduser $USERNAME
|
321
|
321
|
fi
|
322
|
322
|
echo $"Restoring Mutt settings for $USERNAME"
|
323
|
|
- restore_directory_from_usb /root/tempmutt mutt/$USERNAME
|
324
|
|
- if [ -f /root/tempmutt/home/$USERNAME/tempbackup/.muttrc ]; then
|
325
|
|
- cp -f /root/tempmutt/home/$USERNAME/tempbackup/.muttrc /home/$USERNAME/.muttrc
|
|
323
|
+ temp_restore_dir=/root/tempmutt
|
|
324
|
+ restore_directory_from_usb $temp_restore_dir mutt/$USERNAME
|
|
325
|
+ if [ -f $temp_restore_dir/home/$USERNAME/tempbackup/.muttrc ]; then
|
|
326
|
+ cp -f $temp_restore_dir/home/$USERNAME/tempbackup/.muttrc /home/$USERNAME/.muttrc
|
326
|
327
|
fi
|
327
|
|
- if [ -f /root/tempmutt/home/$USERNAME/tempbackup/Muttrc ]; then
|
328
|
|
- cp -f /root/tempmutt/home/$USERNAME/tempbackup/Muttrc /etc/Muttrc
|
|
328
|
+ if [ -f $temp_restore_dir/home/$USERNAME/tempbackup/Muttrc ]; then
|
|
329
|
+ cp -f $temp_restore_dir/home/$USERNAME/tempbackup/Muttrc /etc/Muttrc
|
329
|
330
|
fi
|
330
|
331
|
if [ ! "$?" = "0" ]; then
|
331
|
|
- rm -rf /root/tempmutt
|
|
332
|
+ rm -rf $temp_restore_dir
|
332
|
333
|
set_user_permissions
|
333
|
334
|
backup_unmount_drive
|
334
|
335
|
exit 276
|
335
|
336
|
fi
|
336
|
|
- rm -rf /root/tempmutt
|
|
337
|
+ rm -rf $temp_restore_dir
|
337
|
338
|
fi
|
338
|
339
|
done
|
339
|
340
|
fi
|
|
@@ -353,15 +354,16 @@ function restore_gpg {
|
353
|
354
|
${PROJECT_NAME}-adduser $USERNAME
|
354
|
355
|
fi
|
355
|
356
|
echo $"Restoring gnupg settings for $USERNAME"
|
356
|
|
- restore_directory_from_usb /root/tempgnupg gnupg/$USERNAME
|
357
|
|
- cp -r /root/tempgnupg/home/$USERNAME/.gnupg /home/$USERNAME/
|
|
357
|
+ temp_restore_dir=/root/tempgnupg
|
|
358
|
+ restore_directory_from_usb $temp_restore_dir gnupg/$USERNAME
|
|
359
|
+ cp -r $temp_restore_dir/home/$USERNAME/.gnupg /home/$USERNAME/
|
358
|
360
|
if [ ! "$?" = "0" ]; then
|
359
|
|
- rm -rf /root/tempgnupg
|
|
361
|
+ rm -rf $temp_restore_dir
|
360
|
362
|
set_user_permissions
|
361
|
363
|
backup_unmount_drive
|
362
|
364
|
exit 276
|
363
|
365
|
fi
|
364
|
|
- rm -rf /root/tempgnupg
|
|
366
|
+ rm -rf $temp_restore_dir
|
365
|
367
|
if [[ "$USERNAME" == "$ADMIN_USERNAME" ]]; then
|
366
|
368
|
cp -r /home/$USERNAME/.gnupg /root
|
367
|
369
|
if [ ! "$?" = "0" ]; then
|
|
@@ -389,15 +391,16 @@ function restore_procmail {
|
389
|
391
|
${PROJECT_NAME}-adduser $USERNAME
|
390
|
392
|
fi
|
391
|
393
|
echo $"Restoring procmail settings for $USERNAME"
|
392
|
|
- restore_directory_from_usb /root/tempprocmail procmail/$USERNAME
|
393
|
|
- cp -f /root/tempprocmail/home/$USERNAME/tempbackup/.procmailrc /home/$USERNAME/
|
|
394
|
+ temp_restore_dir=/root/tempprocmail
|
|
395
|
+ restore_directory_from_usb $temp_restore_dir procmail/$USERNAME
|
|
396
|
+ cp -f $temp_restore_dir/home/$USERNAME/tempbackup/.procmailrc /home/$USERNAME/
|
394
|
397
|
if [ ! "$?" = "0" ]; then
|
395
|
|
- rm -rf /root/tempprocmail
|
|
398
|
+ rm -rf $temp_restore_dir
|
396
|
399
|
set_user_permissions
|
397
|
400
|
backup_unmount_drive
|
398
|
401
|
exit 276
|
399
|
402
|
fi
|
400
|
|
- rm -rf /root/tempprocmail
|
|
403
|
+ rm -rf $temp_restore_dir
|
401
|
404
|
fi
|
402
|
405
|
done
|
403
|
406
|
fi
|
|
@@ -716,14 +719,15 @@ function restore_mailing_list {
|
716
|
719
|
fi
|
717
|
720
|
if [ -d /var/spool/mlmmj ]; then
|
718
|
721
|
echo $"Restoring public mailing list"
|
719
|
|
- restore_directory_from_usb /root/tempmailinglist mailinglist
|
720
|
|
- cp -r /root/tempmailinglist/root/spool/mlmmj/* /var/spool/mlmmj
|
|
722
|
+ temp_restore_dir=/root/tempmailinglist
|
|
723
|
+ restore_directory_from_usb $temp_restore_dir mailinglist
|
|
724
|
+ cp -r $temp_restore_dir/root/spool/mlmmj/* /var/spool/mlmmj
|
721
|
725
|
if [ ! "$?" = "0" ]; then
|
722
|
726
|
set_user_permissions
|
723
|
727
|
backup_unmount_drive
|
724
|
728
|
exit 526
|
725
|
729
|
fi
|
726
|
|
- rm -rf /root/tempmailinglist
|
|
730
|
+ rm -rf $temp_restore_dir
|
727
|
731
|
fi
|
728
|
732
|
}
|
729
|
733
|
|