|
#1
|
|||
|
|||
Need to eject both source/destination when SD completes
My goal is to eject both the Source and Destination external disks after an SD backup completes. Currently "scheduled copies" are used and work well. The option "On successful completion" provides an option for ejecting the destination disk but not the source. Presumably, I need to write a shell script to accomplish my goal(?) and hoped someone might have already done this since I'm not proficient with scripts. TIA and thanks for SD! Brian
|
#2
|
||||
|
||||
You'd have to write a "on successful completion" shell script that ejected the volume in the background, well after the run finishes. Something like:
Code:
#!/bin/bash (nohup sleep 30;diskutil eject $2) &
__________________
--Dave Nanian |
#3
|
|||
|
|||
FWIW: writing and implementing a script consisted of the following( YMMV since my situation is simple ):
1. Enter these commands in a text file ( used BBEdit but any text editor should be fine ) diskutil unmount /Volumes/myVolumeName1 diskutil unmount /Volumes/myVolumeName2 2. Save the file with a .sh extension 3. Issue a 'chmod +x' command on the text file to make it executable. 4. Within SD, go to the "Options" "Advanced" tab and designate the shell script to run in the "After copy" section. Works great. Thanks for the nudge Dave. |
#4
|
||||
|
||||
In general, you really don't want to:
- Hardwire the names of the volumes here (they're passed in for you) - Issue this while the copy is not complete, which is why I suggested waiting and doing it in the background But, of course, it's up to you!
__________________
--Dave Nanian |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Feature Suggestion: Eject on Completion ejects ALL volumes on the Drive | cmarcus | General | 2 | 08-31-2009 08:52 PM |
SD update - congrats but::: Eject???? | tuni | General | 6 | 08-28-2009 03:13 PM |
Is there a way eject a Network mount | Gary@tmi | General | 10 | 07-22-2009 10:48 PM |
Eject Icons | desertboomer | General | 1 | 07-02-2009 12:18 PM |
After my backup, I can't eject my drive! | dnanian | Frequently Asked Questions | 0 | 07-17-2008 07:24 AM |