Closed vallsv closed 2 years ago
$ cat supervisord.conf
[supervisord]
nodaemon = true
loglevel = debug
[program:printenv]
command = /bin/bash -c 'env | sort | grep FOO_'
environment =
FOO_1=BAR_1,
FOO_2=BAR_2,
FOO_3=BAR_3
startsecs = 0
autorestart = false
$ supervisord -v
4.2.4
$ supervisord -c supervisord.conf
2022-10-24 09:45:58,421 INFO supervisord started with pid 90000
2022-10-24 09:45:59,427 INFO spawned: 'printenv' with pid 90001
2022-10-24 09:45:59,438 DEBG 'printenv' stdout output:
FOO_1=BAR_1
FOO_2=BAR_2
FOO_3=BAR_3
2022-10-24 09:45:59,438 INFO success: printenv entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-10-24 09:45:59,438 DEBG fd 7 closed, stopped monitoring <POutputDispatcher at 4533793984 for <Subprocess at 4533788896 with name printenv in state RUNNING> (stdout)>
2022-10-24 09:45:59,438 DEBG fd 9 closed, stopped monitoring <POutputDispatcher at 4533793936 for <Subprocess at 4533788896 with name printenv in state RUNNING> (stderr)>
2022-10-24 09:45:59,438 INFO exited: printenv (exit status 0; expected)
2022-10-24 09:45:59,439 DEBG received SIGCHLD indicating a child quit
Sounds perfect. Thanks.
BTW are you interested in an update of the documentation to talk about that?
BTW are you interested in an update of the documentation to talk about that?
Sure, feel free to submit a pull request. Thank you.
Hi,
For a project i will have to handle a lot of env var, that i would like to put in the the
program
definition.I was always struggling with the environment field, because of the quotes. But now i would like to see if there is some way to flatten the way it is written in the file.
Are you interest about such change?
Example from the documentation
Proposal
I have no idea what could be done. But here is some example.
Tell me if you think it is something interesting and i can take a look deeper on what's doable.