Re: [Nagios-devel] nagios init.d patch to set site-specific
-
Guest
Re: [Nagios-devel] nagios init.d patch to set site-specific
--huq684BweRXVnRxX
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
hi nathan,
On Thu, Jul 13, 2006 at 12:43:38PM -0800, Vonnahme, Nathan wrote:
> I had trouble with the contrib/check_oracle_instance.pl plugin not
> picking up my ORACLE_HOME and LD_LIBRARY_PATH environment variables, so
> I patched the nagios daemon start/stop script in /etc/rc.d/init.d to
> read environment variables from a site-specific file named 'nagios_env'
> in the same directory as the .cfg files.
why not just set the environment variables in the init script itself?
> One thing I can't figure out is how to make 'make install-config' not
> overwrite the nagios_env file if you already have one; I think the whole
> point would be to not overwrite it when you upgrade etc.
if this is what you would want to do, you shouldn't ship the
optional env file at all, and have a block in the init script that
does something like:
if [ -r "$env_file" ]; then
. $env_file
fi
thus, if someone wanted to override environment variables, they
could create that file and it would automatically be sourced.
otherwise, nothing would happen and the init script would continue.
sean
--huq684BweRXVnRxX
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
iD8DBQFEuVJqynjLPm522B0RAro5AKCEATCk3ZIg0NlRq1c2FsYvDDWfRQCeInO6
kMkFQLNRyynqaGKHM68zBTs=
=7hKX
-----END PGP SIGNATURE-----
--huq684BweRXVnRxX--
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]