mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
check that ossec.conf exists
This commit is contained in:
@@ -872,7 +872,8 @@ apply_hotfix() {
|
|||||||
|
|
||||||
fix_wazuh() {
|
fix_wazuh() {
|
||||||
FILE="/nsm/wazuh/etc/ossec.conf"
|
FILE="/nsm/wazuh/etc/ossec.conf"
|
||||||
echo "Detecting if ossec.conf needs corrected..."
|
echo "Detecting if $FILE needs corrected..."
|
||||||
|
if [ -f "$FILE" ]; then
|
||||||
if head -1 $FILE | grep -q "xml version"; then
|
if head -1 $FILE | grep -q "xml version"; then
|
||||||
echo "$FILE has an XML header; removing"
|
echo "$FILE has an XML header; removing"
|
||||||
sed -i 1d $FILE
|
sed -i 1d $FILE
|
||||||
@@ -880,6 +881,9 @@ fix_wazuh() {
|
|||||||
else
|
else
|
||||||
echo "$FILE does not have an XML header, so no changes are necessary."
|
echo "$FILE does not have an XML header, so no changes are necessary."
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "$FILE does not exist, so no changes are necessary."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|||||||
Reference in New Issue
Block a user