From ad85fd9784a64aadeb845c75b53ab4842e5aa884 Mon Sep 17 00:00:00 2001 From: David Prevot Date: Wed, 22 Nov 2023 15:46:55 +0100 Subject: [PATCH] IS_MINIFWINCLUDES, IS_NRPEPID: Change Debian release detection logic --- linux/evocheck.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/evocheck.sh b/linux/evocheck.sh index 6c838a2..3a1e365 100755 --- a/linux/evocheck.sh +++ b/linux/evocheck.sh @@ -346,7 +346,7 @@ check_minifw() { } || failed "IS_MINIFW" "minifirewall seems not started" } check_minifw_includes() { - if is_debian_bullseye; then + if { ! is_debian_stretch && ! is_debian_buster ; }; then if grep -q -e '/sbin/iptables' -e '/sbin/ip6tables' "/etc/default/minifirewall"; then failed "IS_MINIFWINCLUDES" "minifirewall has direct iptables invocations in /etc/default/minifirewall that should go in /etc/minifirewall.d/" fi @@ -373,13 +373,13 @@ check_nrpedisks() { test "$NRPEDISKS" = "$DFDISKS" || failed "IS_NRPEDISKS" "there must be $DFDISKS check_disk in nrpe.cfg" } check_nrpepid() { - if { is_debian_bullseye || is_debian_bookworm ; }; then + if { is_debian_stretch || is_debian_buster ; }; then { test -e /etc/nagios/nrpe.cfg \ - && grep -q "^pid_file=/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; + && grep -q "^pid_file=/var/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" else { test -e /etc/nagios/nrpe.cfg \ - && grep -q "^pid_file=/var/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; + && grep -q "^pid_file=/run/nagios/nrpe.pid" /etc/nagios/nrpe.cfg; } || failed "IS_NRPEPID" "missing or wrong pid_file directive in nrpe.cfg" fi }