System Administration

AUTOSTART a daemon at boot time

Regular Advisor

AUTOSTART a daemon at boot time

Hi, I would like to autostart a Nagios daemon at boot time using the command /opt/iexpress/nagios/bin/nrpe -c /opt/iexpress/nagios/etc/nrpe.cfg -d

How exactly do I fit this in the /sbin/rc3.d scenario?

Am running hp-ux 11v2.

James R. Ferguson
Acclaimed Contributor

Re: AUTOSTART a daemon at boot time


Have a look at the 'rc(1M)' manpages or this whitepaper. Either source describes the run-level paradigm used in HP-UX. Be sure to follow the simple steps and rules and you will have no problems with implementing start/stop scripts and daemons.


Steven E. Protter
Exalted Contributor

Re: AUTOSTART a daemon at boot time


Most HP-UX ported software configurations include a configuration options file in /etc/rc.config.d

There is usually an auto start variable in there that you set to 1 for automatic daemon start.

Otherwise you will need to softlink to the startup script a start captial S to start in rc3.d and K to kill in rc2.d

Steven E Protter
Owner of ISN Corporation
Esteemed Contributor

Re: AUTOSTART a daemon at boot time

You need to do several things to start Nagios.

First prepare a file under /etc/init.d with a name like nagios. It should look like other application startup files.

Then have a file ready in /etc/rc.config.d/, which is the switch for startup process. You can find similar files in the same directory.

Finally, you make a link in /etc/rc3.d for startup and/or in /etc/rc2.d for shut down Nagios by using ln -s /etc/init.d/nagios /etc/rc3.d/S***nagios and ln -s /etc/init.d/nagios /etc/rc2.d/Kxxxnagios. The *** and xxx are 3 digit numbers and their sum supposed to be 1000.

Or you can start nagios in another way, that have it in /etc/inetd.conf file. Nagios's manual should have more details about it.