Attention: All pages of this wiki depend on the pages that come before it, in order as they are listed on the Main Page. Please check for Dependencies.
Please also look at What You Need to Know Before Using This Wiki

/etc/init.d/nrpe: Difference between revisions

From COCNM
Jump to navigation Jump to search
m (1 revision)
 
(No difference)

Latest revision as of 02:19, 19 September 2013

#!/bin/sh
# Start/stop the nrpe daemon.
#
# Contributed by Andrew Ryder 06-22-02
# Slight mods by Ethan Galstad 07-09-02
# Added LSB tags and other mods - Bob Miller 13-08-25
### BEGIN INIT INFO
# Provides:          monitoring
# Required-Start:    $local_fs
# Required-Stop:     $all
# Default-Start:     2 3 4 5
# Default-Stop:      0 6
# Short-Description: System Monitoring
# Description:       Monitor System Statistics and Report to Nagios Server
### END INIT INFO

NrpeBin=/bin/nrpe
NrpeCfg=/etc/nrpe.cfg

test -f $NrpeBin || exit 0

case "$1" in
start)  echo -n "Starting nagios remote plugin daemon: nrpe"
        $NrpeBin -c $NrpeCfg -d
        echo "."
        ;;
stop)   echo -n "Stopping nagios remote plugin daemon: nrpe"
        killall $NrpeBin
        echo "."
        ;;
restart) echo -n "Restarting nagios remote plugin daemon: nrpe"
        killall $NrpeBin
        $NrpeBin -c $NrpeCfg -d
        echo "."
        ;;
*)      echo "Usage: /etc/init.d/nrpe start|stop|restart"
        exit 1
        ;;
esac
exit 0