From 202db682a0351575ba46e97052c01e0e26714c12 Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Mon, 5 Feb 2024 19:17:29 +0100 Subject: [PATCH] IS_SYSLOGCONF: modern and legacy tests --- linux/evocheck.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux/evocheck.sh b/linux/evocheck.sh index 3e314b2..8f59475 100755 --- a/linux/evocheck.sh +++ b/linux/evocheck.sh @@ -195,8 +195,13 @@ check_logrotateconf() { test -e /etc/logrotate.d/zsyslog || failed "IS_LOGROTATECONF" "missing zsyslog in logrotate.d" } check_syslogconf() { - grep --quiet --ignore-case "^Syslog for Pack Evolix" /etc/*syslog*/*.conf \ - || failed "IS_SYSLOGCONF" "syslog evolix config file missing" + # Test for modern servers + if [ ! -f /etc/rsyslog.d/10-evolinux-default.conf ]; then + # Fallback test for legacy servers + if ! grep --quiet --ignore-case "Syslog for Pack Evolix" /etc/*syslog*/*.conf; then + failed "IS_SYSLOGCONF" "Evolix syslog config is missing" + fi + fi } check_debiansecurity() { # Look for enabled "Debian-Security" sources from the "Debian" origin