Created
September 26, 2011 06:51
-
-
Save massive/1241738 to your computer and use it in GitHub Desktop.
OSX Lion hibernate script
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/bash | |
if [ "$(whoami)" != 'root' ]; then | |
echo "You have no permission to run $0 as non-root user." | |
exit 1; | |
fi | |
pmset hibernatemode 25 | |
osascript -e 'tell application "System Events" to sleep' | |
sleep 5m | |
pmset hibernatemode 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment