upstart environment variable expansion ambiguity.
seabbott at akamai.com
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
SELENIUM_EXEC='java -jar $SELENIUM_JAR'
So, I saw that in *some* of the examples, variable appear to be escaped
by single quotes (like here: http://upstart.ubuntu.com/cookbook/#env),
so I tried,
SELENIUM_EXEC="java -jar '$SELENIUM_JAR'"
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:
http://upstart.ubuntu.com/cookbook/#environment-variables # (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...
More information about the upstart-devel