Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Tue May 17, 2011 4:31 am 
Offline
Senior Newbie

Joined: Sat Jul 11, 2009 10:38 am
Posts: 5
Hi, maybe I'm missing something but how to debug a stackscript ? There are only a few informations about stackscripts and it seems I'm missing something here. I tried to deploy a stackscript but it is unclear how to see the flow of the script.
Thank you.


Top
   
 Post subject:
PostPosted: Tue May 17, 2011 6:25 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Most stack scripts contain bash functions, if we take http://www.linode.com/stackscripts/view ... criptID=10 for example after the include statement which adds http://www.linode.com/stackscripts/view ... ScriptID=1 into the top of the script, it runs system_update which does the following
Code:
function system_update {
   apt-get update
   apt-get -y install aptitude
   aptitude -y full-upgrade
}


I personally like to add
Code:
set -e
at the top of my stack scripts to make sure they fail on error. You can copy a stack script and add that to the top if you like.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
PostPosted: Fri Sep 25, 2015 8:39 pm 
Offline

Joined: Fri Sep 25, 2015 8:35 pm
Posts: 1
I'm not sure you got an answer to the original question, which was how to go about debugging a StackScript. I have the same question, but given the age of this message it may require starting a new thread.

EDIT:

I guess you got the best answer. Open the Lish console and rebuild the Linode using the StackScript. You can see the process and get an idea of where it stops.


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