PDA

View Full Version : Script on sleep



Silver
10th December 2009, 10:08 AM
On my media centre Mac Mini, I would like it to eject an external drive when the mini goes to sleep. This way the external drive can be turned off, without causing the mini to go into a fit when it discovers the drive is no longer there. Ideally, this should occur regardless of how the mini is put to sleep, ie through the Apple Remote.

I think I can do something like this using launchd, but the only scripts I've worked with thus far are start up scripts. Anyone know how to run a script on sleep?

greyghost751
14th December 2009, 09:42 AM
Have a look at sleepwatcher bb's Homepage (http://www.bernhard-baehr.de/)