Unmount usb drive after backup or restore
This commit is contained in:
parent
7e4223ea76
commit
03aa012125
|
@ -462,7 +462,9 @@ function create_backup_script {
|
|||
echo ' echo "Removing temporary files"' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo " rm -rf /home/$MY_USERNAME/tempfiles" >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo 'fi' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo 'echo "Backup is complete"' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo 'sync' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo 'umount $USB_MOUNT' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo 'echo "Backup to USB drive is complete. You can now unplug it."' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
echo 'exit 0' >> /usr/bin/$BACKUP_SCRIPT_NAME
|
||||
|
||||
echo 'create_backup_script' >> $COMPLETION_FILE
|
||||
|
@ -533,7 +535,9 @@ function create_restore_script {
|
|||
echo " duplicity --force file://$USB_MOUNT/backup/dlna /var/cache/minidlna" >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
|
||||
echo 'echo "Restore completed"' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
echo 'sync' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
echo 'umount $USB_MOUNT' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
echo 'echo "Restore from USB drive is complete. You can now remove it."' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
echo 'exit 0' >> /usr/bin/$RESTORE_SCRIPT_NAME
|
||||
|
||||
echo 'create_restore_script' >> $COMPLETION_FILE
|
||||
|
|
Loading…
Reference in New Issue