View unanswered posts | View active topics It is currently Thu May 23, 2013 6:28 pm



Reply to topic  [ 13 posts ] 
 Force a remote reboot? 
Author Message

Joined: Nov 07, 2003
Posts: 200
Post Force a remote reboot?
My remote Mac Mini, running Indigo Server, is misbehaving, and I'd like to reboot it. I do not have SSH access. I do have Indigo Client access to the server, however. I've tried using Indigo Client to create an action with an embedded Applescript fragment to force a restart (tell application "System Events" to restart), but it's not having any effect. Any ideas much appreciated. Thanks.


Wed Nov 09, 2011 10:16 am
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6662
Location: Austin, Texas
Post Re: Force a remote reboot?
You might try telling the Finder to restart instead. System Events is unpredictable in the best of times.

_________________
Jay (Indigo Support)
Image


Wed Nov 09, 2011 11:09 am
Profile WWW

Joined: Nov 07, 2003
Posts: 200
Post Re: Force a remote reboot?
Thanks for the reply. Sadly, no effect.


Wed Nov 09, 2011 11:13 am
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6662
Location: Austin, Texas
Post Re: Force a remote reboot?
Sounds like your Mac is well and throughly hosed at the moment. There's probably some App running that's canceling the restart because it's hung up... :(

The only two things I can think of to fix that require either VNC (Screen Sharing) or ssh access.

_________________
Jay (Indigo Support)
Image


Wed Nov 09, 2011 11:45 am
Profile WWW

Joined: Nov 07, 2003
Posts: 200
Post Re: Force a remote reboot?
Thanks, Jay. Yeah, I think I'm hosed, too. VNC and SSH not options. Gonna have to get physical access...


Wed Nov 09, 2011 12:01 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6662
Location: Austin, Texas
Post Re: Force a remote reboot?
Have you ever checked in to one of the VNC redirector services? I use iTeleport from my iOS devices to get back to my Macs here at home without opening any firewalls (also have MobileMe/iCloud Back to My Mac access as well from other Macs outside my house). Like Prism for VNC...

_________________
Jay (Indigo Support)
Image


Wed Nov 09, 2011 12:20 pm
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11696
Location: Texas
Post Re: Force a remote reboot?
This may not work because of permission problems, but try:

Code: Select all
do shell script "shutdown -r now"


If that doesn't work then there might be some way to use 'sudo' and pass in your username/password to the shell script but I'm not sure of the exact format.

_________________
Image


Wed Nov 09, 2011 12:28 pm
Profile WWW
Site Admin
User avatar

Joined: Jan 27, 2003
Posts: 11696
Location: Texas
Post Re: Force a remote reboot?
This might work to pass in your password:

Code: Select all
do shell script "echo PASSWORD_HERE | sudo -S shutdown -r now"


Substitutde PASSWORD_HERE with your OS X admin account password. Do NOT put it in quotes.

_________________
Image


Wed Nov 09, 2011 12:59 pm
Profile WWW

Joined: Nov 07, 2003
Posts: 200
Post Re: Force a remote reboot?
This seems to have worked:

Code: Select all
do shell script "shutdown -r now" user name "USERNAME" password "PASSWORD" with administrator privileges


Wed Nov 09, 2011 1:13 pm
Profile

Joined: Nov 22, 2011
Posts: 10
Post Re: Force a remote reboot?
HFTobeason wrote:This seems to have worked:

Code: Select all
do shell script "shutdown -r now" user name "USERNAME" password "PASSWORD" with administrator privileges


Is this working for you in 10.7+? It's returning "username" variable not defined (-2753) when I try this in 10.7.2. I've removed the quotes in the actual code for UN and PW. I've also not tried this before in earlier versions of OSX.


Fri Dec 02, 2011 8:30 am
Profile

Joined: Nov 07, 2003
Posts: 200
Post Re: Force a remote reboot?
@mrdubs - yes, it does work for me. For example, assuming your username is mrdubs and your password is mrdubspassword:

Code: Select all
do shell script "shutdown -r now" user name "mrdubs" password "mrdubspassword" with administrator privileges


Leave the quotes just as above.


Fri Dec 02, 2011 8:37 am
Profile

Joined: Nov 22, 2011
Posts: 10
Post Re: Force a remote reboot?
HFTobeason wrote:@mrdubs - yes, it does work for me. For example, assuming your username is mrdubs and your password is mrdubspassword:

Code: Select all
do shell script "shutdown -r now" user name "mrdubs" password "mrdubspassword" with administrator privileges


Leave the quotes just as above.



Thanks for the rapid response! I will give this slight revision a shot later today.


Fri Dec 02, 2011 9:00 am
Profile

Joined: Nov 22, 2011
Posts: 10
Post Re: Force a remote reboot?
mrdubs wrote:
HFTobeason wrote:@mrdubs - yes, it does work for me. For example, assuming your username is mrdubs and your password is mrdubspassword:

Code: Select all
do shell script "shutdown -r now" user name "mrdubs" password "mrdubspassword" with administrator privileges


Leave the quotes just as above.



Thanks for the rapid response! I will give this slight revision a shot later today.


Worked perfectly! Thanks so much.


Mon Dec 05, 2011 12:12 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ] 

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.