upstart environment variable expansion ambiguity.

Sean Abbott seabbott at
Wed May 23 17:40:51 UTC 2012

I'm writing my first upstart job to run selenium2 as a service on VMs. 
This was my first hack:

It didn't work, and after adding the suggested environment variable
lines to debug my environment, I found out it's because the variables
aren't expanding as I expected.  In the pastebin version, they expand
like so: 


So, I saw that in *some* of the examples, variable appear to be escaped
by single quotes (like here:,
so I tried, 


and then my environment output was:

SELENIUM_EXEC='java -jar '"'"'$SELENIUM_JAR'"'"  #yes, this is a ton of
alternating single and double quotes

So, I have two questions.  Which usage of variables is correct if you
are going to expand them?  This one:

or this one:  # (scroll to
the 'as another example' part.)

Second:  can someone give me a hint as to how to get variable expansion
to work as expected?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the upstart-devel mailing list