2

I want to set an environment variable that will be visible to all processes launched by Upstart. This is on a CentOS system, but I presume the same applies to Ubuntu given that they both use Upstart.

Somewhere in /etc/init/ perhaps?

Note that adding it in /etc/profile.d only applies to login shells. I want all processes (e.g cron, rc.local, etc) to see it.

Obviously I'd prefer not to edit existing sys config files if it can be avoided.

Socio
  • 150
  • 1
  • 7

1 Answers1

0

I believe that /etc/environment should work.

/etc/environment - This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather consists of assignment expressions, one per line. Specifically, this file stores the system-wide locale and path settings.

Ubuntu help

FINESEC
  • 1,371
  • 7
  • 8