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

Sean Schertell sean at datafly.net
Sat Sep 1 04:48:16 CEST 2007


On Aug 31, 2007, at 6:16 PM, Jeremy C. Reed wrote:

> 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


I was trying to be consistent and set everything up as closely as  
possible to the way I had done it on my RetardedHat boxes.

Installing nrpe/nagios-plugins from FreeBSD ports is about a thousand  
times easier and creates a snazzy new-style rc.d script for me right  
out of the box. And now I can just put nrpe2_enable in my rc.conf and  
everything works swimmingly. God I love FreeBSD.

Thanks for mentioning ports -- I don't know why I didn't think of  
trying that before ;-)

Sean



::::  DataFly.Net  ::::
Complete Web Services
http://www.datafly.net


-------------------------------------------------------------------------
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