X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;ds=sidebyside;f=dsa-nagios-nrpe-config%2Fdebian%2Fpostinst;h=5529e941c34ea8eb102522af72a2332c6b70e32e;hb=24d7f0e5aaf2d3cba660d75c4f35e1b361dcfc05;hp=36ecebcf359ce21046766174b9aa040163f5bfed;hpb=b9b1308c1f999f539d660f88689fd64acf0351f8;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-nrpe-config/debian/postinst b/dsa-nagios-nrpe-config/debian/postinst index 36ecebc..5529e94 100644 --- a/dsa-nagios-nrpe-config/debian/postinst +++ b/dsa-nagios-nrpe-config/debian/postinst @@ -12,7 +12,7 @@ if [ -e /etc/nagios/nrpe.cfg ] ; then 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 @@ -30,6 +30,29 @@ if [ -e /etc/nagios/nrpe.cfg ] ; then fi fi +if [ -e /etc/default/nagios-nrpe-server ] ; then + if ! grep '^DAEMON_OPTS="--no-ssl"$' /etc/default/nagios-nrpe-server > /dev/null; then + echo + echo "WARNING: /etc/default/nagios-nrpe-server probably does not set DAEMON_OPTS=\"--no-ssl\". Please fix." + echo + 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