I want to run a script when I shutdown or restart my iMac, running Snow Leopard.
I read somewhere that one could use the /etc/rc.shutdown.local for this, but it is not working for me.
For example, I put the following lines on it:
#!/bin/sh /usr/bin/osascript -e "set volume with output muted"
If I run:
it does indeed mute the sound. However, if I have the sound on and make a restart of the OS, the sound will still be on. Which I guess it means the script was not called.
UPDATE: It is actually working now. I think it's just because the correct name is rc.local.shutdown and not rc.shutdown.local.