#400330 - 12/01/0811:53 AMRe: anyone ever set up rsync or other terminal scr
[Re: Rodrigo Haenggi]
zwei
soporific
Registered: 06/26/04
Posts: 2479
Loc: Near an iPad
look into an app called "Lingon" if you want to start messing around with launchd ..it's great.
While you can do stuff via launchd when volumes are mounted ...you might want to wrap the terminal command into an applescript that looks to see what volume was mounted. Otherwise it will run when ANY volume is mounted.
This is how you would write the script...
Code:
set theVolumeName to "YourFlashDriveNameHERE"
tell application "Finder"
if disk theVolumeName exists then
do shell script "ENTER YOUR TERMINAL COMMAND HERE"
end if
end tell