PREUN
/bin/sh
if [ "$1" = "0" ] ; then
{
if [ -f /var/lock/subsys/nrpe ]; then
/sbin/service nrpe stop 1>&2 || :;
fi }; /sbin/chkconfig --del nrpe
fi
POSTIN
/bin/sh
/sbin/chkconfig --add nrpe
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/nrpe ] && . /etc/sysconfig/nrpe
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/nrpe ]; then
/sbin/service nrpe restart 1>&2 || :;
else
echo 'Run "/sbin/service nrpe start" to start nrpe service.'
fi
fi };
Triggers
nagios-nrpe <
2.6-1.1
/bin/sh
/bin/sed -i -e 's,/var/run/nrpe.pid,/var/run/nrpe/nrpe.pid,' /etc/nagios/nrpe.cfg