Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Aug 28, 2011 8:19 pm 
Offline
Senior Member

Joined: Sun Oct 30, 2005 7:52 pm
Posts: 97
I'm wanting to reboot a linode after deploying using stackscripts, but the script just keeps running after each reboot. It acts like it doesn't thnk it has completely successfully. Anyone got any other ideas other than using the API to reboot it?

--
Travis


Top
   
 Post subject:
PostPosted: Mon Aug 29, 2011 2:26 am 
Offline
Senior Member

Joined: Sat Nov 27, 2010 8:21 pm
Posts: 63
Try using "shutdown -r" to initiate the reboot after a minute. That should allow the script to finish normally.


Top
   
 Post subject:
PostPosted: Mon Aug 29, 2011 2:39 am 
Offline
Senior Member

Joined: Mon Aug 29, 2011 2:34 am
Posts: 77
You might need to run it in a backgrounded subshell with a delay to allow the stackscript to exit normally. This should work:
Code:
(sleep 10; shutdown -r -t 0) &
The shell running the StackScript should automatically disown the background job on exit.


Top
   
 Post subject:
PostPosted: Mon Aug 29, 2011 12:30 pm 
Offline
Linode Staff
User avatar

Joined: Tue Apr 15, 2003 6:24 pm
Posts: 3090
Website: http://www.linode.com/
Location: Galloway, NJ
Right. Your StackScript script must actually exit and allow our parent script to clean up.

-Chris


Top
   
 Post subject:
PostPosted: Mon Aug 29, 2011 11:07 pm 
Offline
Senior Member

Joined: Sun Oct 30, 2005 7:52 pm
Posts: 97
Code:
(sleep 10; shutdown -r -t 0) &

Thanks, turns out I had a typo in the script. Although I ended up using yours and dropping the -t option for more consistency.

--
Travis


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group