#!/usr/bin/env bash{l_output=""l_output2=""# Check the status of rsyslog and journaldifsystemctlis-active--quietrsyslog;thenl_output="$l_output\n - rsyslog is in use\n- follow the recommendations in Configure rsyslog subsection only"elifsystemctlis-active--quietsystemd-journald;thenl_output="$l_output\n - journald is in use\n- follow the recommendations in Configure journald subsection only"elseecho-e“unabletodeterminesystemlogging”
l_output2="$l_output2\n - unable to determine system logging\n-Configure only ONE system logging: rsyslog OR journald"fiif[-z"$l_output2"];then# Provide audit resultsecho-e"\n- Audit Result:\n ** PASS **\n$l_output\n"elseecho-e"\n- Audit Result:\n ** FAIL **\n - Reason(s) for audit failure:\n$l_output2"fi}