X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-nrpe-config%2Fdebian%2Fpostinst;h=391e31b7db25de6b24f9dd498eab86d7d0595adf;hb=1aa1770d0735a2fa0d1656bc3666bdaed062cb1e;hp=5529e941c34ea8eb102522af72a2332c6b70e32e;hpb=d4d9c9081e4c51620f3b05775bb8e7105005fb95;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-nrpe-config/debian/postinst b/dsa-nagios-nrpe-config/debian/postinst index 5529e94..391e31b 100644 --- a/dsa-nagios-nrpe-config/debian/postinst +++ b/dsa-nagios-nrpe-config/debian/postinst @@ -47,12 +47,25 @@ if [ -e /etc/sudoers ] ; then fi fi +if [ -e /usr/sbin/hpacucli ] && [ -e /dev/cciss/c0d0 ] ; then + if ! grep '^nagios.*hpacucli' /etc/sudoers > /dev/null; then + echo + echo 'WARNIG: Add these lines to sudoers:' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller all show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 pd all show' + echo 'nagios ALL=(ALL) NOPASSWD: /usr/sbin/hpacucli controller slot=0 show status' + 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 +/usr/share/dsa/weak-ssh-keys-check -s /var/cache/dsa/nagios/weak-ssh-keys + #DEBHELPER# exit 0