Tuesday, March 29, 2011

HIbernate mac from cli

I forgot to turn off my mac and left the house, so what's a guy to do? Right log in via ssh (having dyndns working is a real plus here) and hibernate it. To do this use the following snippet in a script.
#!/bin/bash
osascript << EOT
tell application "System Events"
     sleep
end
EOT

No comments:

Post a Comment