|
@@ -3286,17 +3286,19 @@ function create_restore_script {
|
3286
|
3286
|
echo ' for d in /home/*/ ; do' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3287
|
3287
|
echo ' USERNAME=$(echo "$d" | awk -F '"'"'/'"'"' '"'"'{print $3}'"'"')' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3288
|
3288
|
echo ' if [[ $USERNAME != "git" ]]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3289
|
|
- echo ' echo "Restoring spamassassin settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3290
|
|
- echo ' restore_directory_from_usb /root/tempspamassassin spamassassin/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3291
|
|
- echo -n " cp -rf /root/tempspamassassin/${RESTORE_SUBDIR}" >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3289
|
+ echo ' if [ -d $USB_MOUNT/backup/spamassassin/$USERNAME ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3290
|
+ echo ' echo "Restoring spamassassin settings for $USERNAME"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3291
|
+ echo ' restore_directory_from_usb /root/tempspamassassin spamassassin/$USERNAME' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3292
|
+ echo -n " cp -rf /root/tempspamassassin/${RESTORE_SUBDIR}" >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3292
|
3293
|
echo '$USERNAME/.spamassassin /home/$USERNAME/' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3293
|
|
- echo ' if [ ! "$?" = "0" ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3294
|
|
- echo ' umount $USB_MOUNT' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3295
|
|
- echo ' rm -rf $USB_MOUNT' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3294
|
+ echo ' if [ ! "$?" = "0" ]; then' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3295
|
+ echo ' umount $USB_MOUNT' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3296
|
+ echo ' rm -rf $USB_MOUNT' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3297
|
+ echo ' rm -rf /root/tempspamassassin' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3298
|
+ echo ' exit 276' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
|
3299
|
+ echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3296
|
3300
|
echo ' rm -rf /root/tempspamassassin' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3297
|
|
- echo ' exit 276' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3298
|
3301
|
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3299
|
|
- echo ' rm -rf /root/tempspamassassin' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3300
|
3302
|
echo ' fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3301
|
3303
|
echo ' done' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
3302
|
3304
|
echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|