I'm trying to set the ORACLE_HOME environment variable for my nagios daemon user (it's a nologin user).
I've tried adding a script to export the variable in /etc/profile.d/oracle.sh (the execute bits are also set on this file).
This script sets the environment variable for my own user, but not for the nagios daemon.
Daemons started via initscripts don't read
profile.d/
. You'll need to make the initscript source a file from/etc/sysconfig/
that contains the desired value (and then make theprofile.d/
script read it from this as well).