How can I silence the startup chime on El Capitan? It's insane that in 2016 we still have to do with this, but since upgrading to El Capitan, previous solutions don't seem to work for me anymore. This is what I've tried.
silence.sh
sudo nvram SystemAudioVolume=&quot;%00&quot; # does nothing
osascript -e 'set volume with output muted'
echo &quot;run at $(date)&quot; &gt;&gt; /var/log/silence_log.txt

1. LogoutHook
This is what worked on Yosemite
sudo defaults write com.apple.loginwindow LogoutHook /path/to/silence.sh

but ceased to work on my almost fresh El Capitan install
2. LaunchAgent
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd&gt;
&lt;plist version=&quot;1.0&quot;&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;Silence&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/path/to/silence.sh&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;

But running launchctl load silence_sysvol.plist doesn't write anything to the log, so the script doesn't seem to run and I haven't figured out how to have it always be loaded and run at logout.
I read that launchd will send SIGTERM to the agents on logout, so would something like this be a way to go?
#!/usr/bin/env bash

function silence()
{
   sudo nvram SystemAudioVolume=&quot;%00&quot; # not working
   osascript -e 'set volume with output muted'
   echo &quot;run at $(date)&quot; &gt;&gt; /var/log/silence_log.txt
}

trap silence SIGTERM
silence

3. nobootsound
Tried this, didn't work.
After a (few) restart(s), method 1 is back to working. Beats me.