Muting Mac on Sleep/Wake?
Sleepwatcher only accepts a single executable/script, so you have to put the command you want to run in its own file.

Create a file mute.applescript:

#!/usr/bin/osascript
set volume with output muted


Set it as executable:

chmod +x mute.applescript


Then do:

/usr/local/sbin/sleepwatcher --verbose --sleep /path/to/mute.applescript