Last active
August 29, 2015 13:56
-
-
Save narendrans/12164f5cca046e007f30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script mutes system volume during logout or shutdown. To prevent the system from giving the sound during bootup. | |
touch /Users/naren/Development/shell/mute.sh | |
echo "#!/bin/sh\nsudo osascript -e \"set Volume 0\"" > /Users/naren/Development/shell/mute.sh | |
# elevate privileges | |
sudo chmod +x /Users/naren/Development/shell/mute.sh | |
# This line hooks the script to logout | |
sudo defaults write com.apple.loginwindow LogoutHook /Users/naren/Development/shell/mute.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment