Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: View StackScript Logs?
PostPosted: Wed Nov 03, 2010 6:29 am 
Offline

Joined: Wed Nov 03, 2010 6:26 am
Posts: 1
I have a stackscript which for some reason is not completing successfully. Is there a way to view the output of the stackscript?

Thank You,
brendon


Top
   
 Post subject:
PostPosted: Wed Nov 03, 2010 10:58 am 
Offline
Senior Newbie

Joined: Tue Jan 19, 2010 7:59 pm
Posts: 14
Website: http://www.scottphillips.com
I've always included a bit to redirect the scripts output to a file, then restore stdout and stderr afterwards. Otherwise you won't be able to login from the console :)

# Save stdout and stderr
exec 6>&1
exec 5>&2

# Redirect stdout and stderr to a file
exec > /root/StackScript.out
exec 2>&1

[....do_stuff....]

# Restore stdout and stderr
exec 1>&6 6>&-
exec 2>&5 5>&-


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


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group