3 # Created 2000-01-03 by jaclu@grm.se
4 # Rewritten for PLD 2004-06-02 by patrys@pld-linux.org
6 # nrpe This shell script takes care of starting and stopping
9 # chkconfig: 2345 80 30
10 # description: nrpe is a daemon for a remote nagios server, \
11 # running nagios plugins on this host.
13 # config: /usr/local/nagios/etc/nrpe.cfg
15 . /etc/rc.d/init.d/functions
17 # Source networking configuration.
18 . /etc/sysconfig/network
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down "nrpe"
32 if [ -f /var/lock/subsys/nrpe ]; then
33 msg_already_running "nrpe"
36 daemon nrpe -c /etc/nagios/nrpe.cfg -d
37 touch /var/lock/subsys/nrpe
41 if [ -f /var/lock/subsys/nrpe ]; then
44 rm -f /var/lock/subsys/nrpe
46 msg_not_running "nrpe"
58 echo "Usage: nrpe {start|stop|restart|force-reload|status}"