public
Created — forked from mariosangiorgio/hibernate.sh

OSX Lion hibernate script

  • Download Gist
hibernate.sh
Shell
1 2 3 4 5 6 7 8 9
#!/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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.