diff --git a/setup/ssd.sh b/setup/ssd.sh new file mode 100755 index 0000000..66b666a --- /dev/null +++ b/setup/ssd.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# Some tweaks for SSD drives +# Details: http://blog.alutam.com/2012/04/01/optimizing-macos-x-lion-for-ssd/ + +# Ask for the administrator password upfront +sudo -v + +# Turn off local Time Machine snapshots [laptops only] +sudo tmutil disablelocal + +# Turn off hibernation [laptops only] +sudo pmset -a hibernatemode 0 +sudo command rm /var/vm/sleepimage + +# Turn off sudden motion sensor [no HDD only] +sudo pmset -a sms 0 + +# Disable records last access time for every file +echo ' + + + + Label + com.nullvision.noatime + ProgramArguments + + mount + -vuwo + noatime + / + + RunAtLoad + + +' | sudo tee /Library/LaunchDaemons/com.nullvision.noatime.plist +sudo chown root:wheel /Library/LaunchDaemons/com.nullvision.noatime.plist + +# Delay (180 minutes) hard drive sleep [no HDD only] +sudo pmset -b disksleep 180 # Battery +sudo pmset -c disksleep 180 # Power adapter + + +echo +echo "You need to restart your computer for the changes to take effect." \ No newline at end of file