5

I need to proxy multiple environment variables from /etc/environment to a process managed by a supervisor.

The following configuration worked for me with supervisor 3.0r1-1 but supervisor 3.2.0-2 reports an error:

environment=FOO=$FOO,BAR=$BAR,BAZ=$BAZ

Error: Unexpected end of key/value pairs in value...

Some answers suggest to quote the values but if I do so, the variables wouldn't be expanded to real values.

What am I doing wrong? How to fix it?

Kolyunya
  • 217
  • 1
  • 3
  • 9

1 Answers1

9

According to http://supervisord.org/configuration.html?highlight=environment, have you tried putting them all on one line?

environment=A="1",B="2"

(that is, = is used for both environment itself and for the key-value pairs, separated by commas, with the values bounded with quotation marks)

Also, where does $FOO come from? http://supervisord.org/subprocess.html#subprocess-environment says 'No shell is executed by supervisord when it runs a subprocess' so its not clear how you expect $FOO to work.

Calaf
  • 111
  • 5
Jason Martin
  • 5,023
  • 17
  • 24