Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Restarting a remote Mac via AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Restarting a remote Mac via AppleScript
Authored by: newbish on Aug 04, '03 09:07:21AM
You can also tell your Mac to sleep by replacing the word 'restart' with the word 'sleep.'

I can confirm that it works quite nicely, as I now cannot SSH into my Mac at home because it is now sleeping! :)

Be careful with the shutdown command unless you are certain there is nothing you need to save in the Aqua layer. Shutdown, as a UNIX-layer command, will pull the rug out from everything else. The only thing it does gracefully is offer you the opportunity to delay the actual shutdown to give other users on your Mac the chance to save their work before it actually goes down. You can also have it broadcast a message to other terminals to warn other users.

Bear in mind, the only warnings users will receive are broadcast to the Terminal, not to the GUI. If someone is sitting at your Mac at home when you send the shutdown command via SSH to the terminal, that person will be in for a very unpleasant surprise. Makes for a really nasty April Fool's prank on someone...!

[ Reply to This | # ]