On Tue, Feb 13, 2018 at 05:20:02PM +0000, Eric Lindblad
wrote:> Not precise to setting an environment variable prior to running a
> specific command, IIRC Debian does not utilise an /etc/profile.d
> directory, but the Debian-based Ubuntu does, so one could write for
> that directory .csh and .sh scripts, make them executable and the
> environment variables in those shell scripts will then be loaded when
> a specific user logs in.
Debian uses /etc/profile.d too (and has done for nearly 8 years):
https://bugs.debian.org/545756
However, the profile is only read at startup by login shells, so that's
probably not going to help for getting variables set in the webserver
process(es).
For apache, you can use SetEnv in its config file as I mentioned before.
Cheers,
Olly