nagios-nrpe/package/solaris/pkg/nrpe
2016-06-24 12:21:25 +02:00

33 lines
419 B
Bash

#!/sbin/sh
#
NRPE=/opt/nagios/bin/nrpe
CFGFILE=/etc/nagios/nrpe.cfg
PIDFILE=/var/run/nrpe.pid
case $1 in
'start')
$NRPE -c $CFGFILE -d
;;
'restart')
if [ -f "$PIDFILE" ]; then
/usr/bin/kill -HUP `/usr/bin/cat $PIDFILE`
fi
;;
'stop')
if [ -f "$PIDFILE" ]; then
/usr/bin/kill `/usr/bin/cat $PIDFILE`
/bin/rm -f $PIDFILE
fi
;;
*)
echo "Usage: $0 { start | restart | stop }"
exit 1
;;
esac
exit $?