[PATCH] daemon-init.in - init script
Sven-Göran Bergh
sgb at systemasis.com
Thu Nov 6 12:36:59 CET 2008
Hi,
I have done some adjustments to the init script (daemon-init.in, see
attachment). Parameters already defined in nagios.cfg are also defined
in the init script. Thus, changes made to nagios.cfg will be unknown to
the init script. This patch makes the init script read these params from
nagios.cfg instead (ex: log_file, nagios_user, etc).
I have only tested this with ash and bash under Linux, so other
environments need also be tested.
There are still minor cosmetics to take care of though. Unfortunately
that involves the ./configure process, and I am sure there are a lot of
thoughts behind that one, so I do not dare touch it :-)
Consider the following lines:
prefix=@prefix@
exec_prefix=@exec_prefix@
NagiosBin=@bindir@/nagios
NagiosCfgFile=@sysconfdir@/nagios.cfg
If you do not explicitly define your paths during the ./configure (ex:
--bindir=/usr/local/nagios/bin). The above lines will become:
prefix=/usr/local/nagios
exec_prefix=${prefix}
NagiosBin=${exec_prefix}/bin/nagios
NagiosCfgFile=${prefix}/etc/nagios.cfg
Since the first two paths are not needed elsewhere in the init script I
would prefer skip them and get:
NagiosBin=/usr/local/nagios/bin/nagios
NagiosCfgFile=/usr/local/nagios/etc/nagios.cfg
But for that to happen some tweaking needs to be done in the
configuration process, which currently is out of my reach.
Meanwhile, please feel free to test this patch on as many platforms as
possible.
Take care
/Sven
______________________________________________
Sven-Göran Bergh
Systemasis AB
______________________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nagios-init.patch
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20081106/aff391c5/attachment.ksh>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list