1

can't access sourced variables inside Upstart script stanzas

view story
linux-howto

http://serverfault.com – I'm trying to use the variables defined in /etc/environment in an upstart script. I'm able to export the variable to the child process but for some reason I not able to use them in the upstart script stanza itself. This works: script . /etc/environment export NODE_ENV # node is able to read the NODE_ENV, wonderful! /usr/local/bin/node /path/to/app/app.js end script But if I try to introduce some conditional logic within the stanza then it will fail: script . /etc/environment export NODE_ENV # ${NODE_ENV} is not set inside the stanza if [[ ${NODE_ENV} = ' (HowTos)