reboot from a stackscript

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?


4 Replies

Try using "shutdown -r" to initiate the reboot after a minute. That should allow the script to finish normally.

You might need to run it in a backgrounded subshell with a delay to allow the stackscript to exit normally. This should work: (sleep 10; shutdown -r -t 0) & The shell running the StackScript should automatically disown the background job on exit.

Right. Your StackScript script must actually exit and allow our parent script to clean up.


(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.



Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct