Adapting IS_NRPEPOSTFIX check for Wheezy.

This commit is contained in:
Benoît S. 2013-06-07 14:36:37 +02:00
parent 08165c9a90
commit b79a56710b

View file

@ -123,6 +123,11 @@ if [ -e /etc/debian_version ]; then
if [ "$IS_UMASKSUDOERS" = 1 ]; then
grep -q ^Defaults.*umask=0077 /etc/sudoers || echo 'IS_UMASKSUDOERS FAILED!'
fi
# Verifying check_mailq in Nagios NRPE config file. (Option "-M postfix" need to be set if the MTA is Postfix)
if [ "$IS_NRPEPOSTFIX" = 1 ]; then
is_installed postfix && ( grep -q "^command.*check_mailq -M postfix" /etc/nagios/nrpe.cfg || echo 'IS_NRPEPOSTFIX FAILED!' )
fi
fi
if [ $(lsb_release -c -s) = "wheezy" ]; then
@ -135,6 +140,11 @@ if [ -e /etc/debian_version ]; then
egrep -q "Defaults.*umask=0077" /etc/sudoers.d/evolinux || \
echo 'IS_CUSTOMSUDOERS FAILED!'
fi
# Verifying check_mailq in Nagios NRPE config file. (Option "-M postfix" need to be set if the MTA is Postfix)
if [ "$IS_NRPEPOSTFIX" = 1 ]; then
is_installed postfix && ( grep -q "^command.*check_mailq -M postfix" /etc/nagios/nrpe.d/evolix.cfg || echo 'IS_NRPEPOSTFIX FAILED!' )
fi
fi
# Compatible Squeeze & Wheezy.
@ -212,11 +222,6 @@ if [ -e /etc/debian_version ]; then
[ "$NRPEDISKS" = "$DFDISKS" ] || echo 'IS_NRPEDISKS FAILED!'
fi
# Verification du check_mailq dans nrpe.cfg (celui-ci doit avoir l'option "-M postfix" si le MTA est Postfix)
if [ "$IS_NRPEPOSTFIX" = 1 ]; then
is_installed postfix && ( grep -q "^command.*check_mailq -M postfix" /etc/nagios/nrpe.cfg || echo 'IS_NRPEPOSTFIX FAILED!' )
fi
if [ "$IS_GRSECPROCS" = 1 ]; then
uname -a | grep -q grsec && ( grep -q ^command.check_total_procs..sudo /etc/nagios/nrpe.cfg && grep -A1 "^\[processes\]" /etc/munin/plugin-conf.d/munin-node | grep -q "^user root" || echo 'IS_GRSECPROCS FAILED!' )
fi