fi
if ! grep '^allowed_hosts=' /etc/nagios/nrpe.cfg > /dev/null; then
echo
- echo "WARNING: /etc/nagios/nrpe.cfg does not define allowed_hosts. Please fix."
+ echo "WARNING: /etc/nagios/nrpe.cfg does not define allowed_hosts. Please fix (set allowed_hosts=$NAGIOS_MASTER)."
echo
else
found=0
fi
fi
+if [ -e /etc/sudoers ] ; then
+ if ! grep '^nagios.*/usr/lib/nagios/plugins/dsa-check-dabackup' /etc/sudoers > /dev/null; then
+ echo
+ echo 'WARNIG: Add this line to sudoers:'
+ echo 'nagios ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/dsa-check-dabackup ""'
+ echo
+ fi
+fi
+
+if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d nagios-nrpe-server restart || exit $?
+else
+ /etc/init.d/nagios-nrpe-server restart || exit $?
+fi
+
#DEBHELPER#
exit 0