I know how to make your Mac play a sound when you log into it using Automator and the afPlay command in an aplication, then set it as a log in item. But is it possible to have your mac play a sound when loging out or shutting down? If so, please inform me