<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm writing my first upstart job to run selenium2 as a service on
VMs. This was my first hack:<br>
<a class="moz-txt-link-freetext" href="http://paste.ubuntu.com/1003268/">http://paste.ubuntu.com/1003268/</a><br>
<br>
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: <br>
<br>
SELENIUM_EXEC='java -jar $SELENIUM_JAR'<br>
<br>
So, I saw that in <b>some</b> of the examples, variable appear to
be escaped by single quotes (like here:
<a class="moz-txt-link-freetext" href="http://upstart.ubuntu.com/cookbook/#env">http://upstart.ubuntu.com/cookbook/#env</a>), so I tried, <br>
<br>
SELENIUM_EXEC="java -jar '$SELENIUM_JAR'"<br>
<br>
and then my environment output was: <br>
<br>
SELENIUM_EXEC='java -jar '"'"'$SELENIUM_JAR'"'" #yes, this is a ton
of alternating single and double quotes<br>
<br>
So, I have two questions. Which usage of variables is correct if
you are going to expand them? This one: <br>
<br>
<a class="moz-txt-link-freetext" href="http://upstart.ubuntu.com/cookbook/#env">http://upstart.ubuntu.com/cookbook/#env</a><br>
<br>
or this one:<br>
<a class="moz-txt-link-freetext" href="http://upstart.ubuntu.com/cookbook/#environment-variables">http://upstart.ubuntu.com/cookbook/#environment-variables</a> # (scroll
to the 'as another example' part.)<br>
<br>
Second: can someone give me a hint as to how to get variable
expansion to work as expected?<br>
<br>
Thanks!<br>
<br>
sean<br>
</body>
</html>