INETD and NRPE daemon in solaris 8]
Jim Mozley
jim.mozley at exponential-e.com
Thu Jan 6 17:43:25 CET 2005
Sudheer Muddappa wrote:
> It works fine when I start it from the command line.
> But no luck with inetd.
> I have to start it with rc.local if I cannot make it work with inetd.
Solaris uses system v run levels. Create a startup script in /etc/init.d
and link to the appropriate run level. E.g.
File /etc/init.d/nrpe:
-----start file-----
#!/bin/sh
NrpeBin=/usr/local/nagios/sbin/nrpe
NrpeCfg=/usr/local/nagios/etc/nrpe.cfg
# See how we were called.
case "$1" in
start)
# Start daemons.
echo "Starting nrpe: "
$NrpeBin -c $NrpeCfg --daemon
echo
;;
stop)
# Stop daemons.
echo "Shutting down nrpe: "
/usr/bin/pkill -f $NrpeBin
echo
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: nrpe {start|stop|restart}"
exit 1
esac
exit 0
---eof----
Then link the files...
# ln -s /etc/init.d/nrpe /etc/rc3.d/S99nrpe
# ln -s /etc/init.d/nrpe /etc/rc1.d/K01nrpe
The above is untested!
> If you know how can I make it work with inetd that will help.
Sorry I don't run it that way so I cannot help you there. I'd imagine
it's more efficient to run as a daemon rather than have it go through
inetd, but couldn't say this definitively.
Jim Mozley
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
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