How to auto-start NRPE daemon on reboot (FreeBSD) ?

Jeremy C. Reed reed at reedmedia.net
Sat Sep 1 03:16:28 CEST 2007


On Fri, 31 Aug 2007, Sean Schertell wrote:

> I've got a spiffy new rc.d script that works great for starting/ 
> stopping the nrpe daemon. But simply adding nrpe_enable="yes" to my / 
> etc/rc.conf doesn't seem to do the trick.
> 
> Does anyone know how I can tell FreeBSD to fire off the "/usr/local/ 
> etc/rc.d/nrpe start" command at boot time?
> 
> In case anyone's interested, here's my script:

Your script is not an script using FreeBSD's new rc.d semantics. So don't 
use rc.conf setting of nrpe_enable="yes" for that. (As it won't know.)

To use old style, name it to end with ".sh" and make sure it is 
executable. The defaults of FreeBSD should then work to find it and run it 
at boot.

If you want to use FreeBSD's new rc.d semantics, have a look at the 
rc.d scripts included by FreeBSD's nrpe and nrpe2 ports as examples.

  Jeremy C. Reed

p.s. Some of this is documented in the FreeBSD Handbook. Also some is 
documented in 
http://bsdwiki.reedmedia.net/wiki/Configure_a_service_to_start_at_boot_time.html
http://bsdwiki.reedmedia.net/wiki/Use_an_rc__40__8__41___script_to_determine_if_a_service_is_running_and_start__44___restart_or_stop_it_as_required.html

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list