Can anyone point me in the right direction to setup an Applescript to run before the computer goes to sleep? I'm getting really frustrated by Finder's inability to handle mounted SMB shares after it sleeps. My plan is to write a script to automatically disconnect shares before sleeping.
I don't think I need to limit myself to applscript either, so if you know how to trigger a CLI script on sleep, speak up too.
TIA