Skip to content. | Skip to navigation

Personal tools
Log in
You are here: Home


Showing blog entries tagged as: environment

Super Environment

Posted by Manuel Reinhardt at Nov 16, 2017 03:50 PM |
Filed under: ,

If you're using supervisor a lot then you may know that you can pass environment variables to subprocesses. Ideally you would also know that if you don't do that then the environment of the shell that was used to start supervisor is inherited (see Supervisor Documentation - Subprocess Environment). But in the heat of battle you may forget that it makes a lot of difference whether this starting shell is something like an interactive bash session or a cron job.

In one of our projects we had applied a workaround that relied on setting the PATH environment variable so that a specific version of a tool was used. The PATH was set in the bashrc, so when starting supervisor manually from bash it worked fine. But at some point the machine was restarted and an @reboot cron job started the supervisor. And suddenly a different version of the tool was used...