Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (13 sloc) 312 Bytes
#!/bin/bash
# Force hibernation once and return to sleep mode
if [ $UID != 0 ]
then
echo "$0 requires root"
exit
fi
#use hibernatemode 25 for fastest hibernation
pmset -a hibernatemode 25
#/usr/bin/osascript -e 'tell application "System Events" to sleep'
pmset sleepnow
sleep 10
pmset -a hibernatemode 0