From 562c406d9511d408cb37cc7b6a59e2a7130cdaf3 Mon Sep 17 00:00:00 2001 From: liuyafei Date: Sun, 29 Jan 2023 06:25:57 +0000 Subject: [PATCH] =?UTF-8?q?update=202.15-ensure-rsyslog-is-configured-to-s?= =?UTF-8?q?end-logs-to-a-remote-log-host.sh.=20=E4=BF=AE=E6=94=B9=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=E5=8F=98=E9=87=8F=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: liuyafei --- ...rsyslog-is-configured-to-send-logs-to-a-remote-log-host.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scanners/logging-and-auditing/2.15-ensure-rsyslog-is-configured-to-send-logs-to-a-remote-log-host.sh b/scanners/logging-and-auditing/2.15-ensure-rsyslog-is-configured-to-send-logs-to-a-remote-log-host.sh index 0dcc0d1..843470d 100644 --- a/scanners/logging-and-auditing/2.15-ensure-rsyslog-is-configured-to-send-logs-to-a-remote-log-host.sh +++ b/scanners/logging-and-auditing/2.15-ensure-rsyslog-is-configured-to-send-logs-to-a-remote-log-host.sh @@ -2,12 +2,12 @@ result_rsyslog=false result_rsyslog_d=false conf_file_path=`ls /etc/rsyslog.d/*.conf` -if [[ -a /etc/rsyslog.conf && -a $file ]]; then +if [[ -a /etc/rsyslog.conf && -a $conf_file_path ]]; then grep -q "^*.*[^I][^I]*@" /etc/rsyslog.conf && result_rsyslog=true grep -q "^*.*[^I][^I]*@" /etc/rsyslog.d/*.conf && result_rsyslog_d=true elif [[ -a /etc/rsyslog.conf ]]; then grep -q "^*.*[^I][^I]*@" /etc/rsyslog.conf && result_rsyslog=true -elif [[ -a $file ]]; then +elif [[ -a $conf_file_path ]]; then grep -q "^*.*[^I][^I]*@" /etc/rsyslog.d/*.conf && result_rsyslog_d=true fi -- Gitee