/srv/irclogs.ubuntu.com/2011/10/05/#upstart.txt

SpamapShallyn_: yeah that would be good03:56
dcorbin_workWhen a job has a script in it, is there some way to see the stdout/stderr of that script?11:45
dcorbin_work:q12:06
dcorbin_workI have an upstart job that is trying to use environment variables inside of a shell script.  It /looks/ like my variable references ${FOO} are being translated to "" by upstart.  I'm at a loss here.12:12
jhuntdcorbin_work: http://upstart.ubuntu.com/cookbook/#see-the-environment-a-job-runs-in12:58
jhuntdcorbin_work: http://upstart.ubuntu.com/cookbook/#environment-variables12:58
dcorbin_workjhunt: I looked through all of those.  None of those confirm or even describe if all environment variables references in the script are processed by upstart rather than the shell.13:01
dcorbin_worklet me give you a pastebin13:02
dcorbin_workhttp://pastebin.com/uKBuQhTA  : I'm finding things improved if I use "\$" instead of "$"13:19
dcorbin_workBut, the escaping only works if it's inside double-quotes. Weird13:25
jhuntthat's not a complete .conf file. Why are you using bash? I'm rather intrigued by what you're trying to do since there are very few reasons to use a while loop in a job like that.13:26
dcorbin_workjhunt: I was using bash because I find it impossible to get useful information about a failing script out of upstart.  I didn't know dash existed until this morning, and I don't know what's different.13:29
dcorbin_workThat top part was the entirety of a post-start script13:30
jhunt"man dash" - seriously, you shouldn't need to use bash. There's a section in the cookbook if you insist, but I'd recommend against it.13:30
dcorbin_workWhat I'm trying to do, is poll the server to be until it is actually finished coming up.13:30
jhuntthat doesn't fit upstarts model; the server daemon needs a .conf file so that when the server is ready, the "started JOB=<server>" event will be emitted. You can then write a job that uses that to trigger further actions if required.13:31
dcorbin_workI will probably drop it before I'm done,  I did "man dash", but I don't find it "small and absorbable'13:31
jhuntit's a lot smaller than "man bash" :)13:31
jhuntMost of the syntax is the same.13:31
dcorbin_workWe're starting a jboss server.  It completes the launching fairly quickly, but everything is not fully deployed and ready at that time.13:32
dcorbin_workI agree that polling is "not desireable".13:32

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!