systemd: “Environment” directive to set PATH
You can’t use EnvVars in Environment directives. The whole Environment= will be ignored. If you use EnvironmentFile=, then the specified file will be loaded without substitution. So PATH=/local/bin:$PATH would be exactly that, and this is probably not what you want. Under CentOS7 the following works. # /etc/systemd/system/nagios.service.d/env.conf [Service] Environment=”PATH=/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin” > sudo systemctl daemon-reload > sudo … Read more