IS_SYSLOGCONF: modern and legacy tests

This commit is contained in:
Jérémy Lecour 2024-02-05 19:17:29 +01:00 committed by Jérémy Lecour
parent 25b00f6fa7
commit 202db682a0
Signed by: jlecour
SSH key fingerprint: SHA256:h+5LgHRKwN9lS0SsdVR5yZPeFlJE4Mt+8UtL4CcP8dY

View file

@ -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