mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
check that ossec.conf exists
This commit is contained in:
@@ -872,13 +872,17 @@ 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 head -1 $FILE | grep -q "xml version"; then
|
if [ -f "$FILE" ]; then
|
||||||
echo "$FILE has an XML header; removing"
|
if head -1 $FILE | grep -q "xml version"; then
|
||||||
sed -i 1d $FILE
|
echo "$FILE has an XML header; removing"
|
||||||
so-wazuh-restart
|
sed -i 1d $FILE
|
||||||
else
|
so-wazuh-restart
|
||||||
echo "$FILE does not have an XML header, so no changes are necessary."
|
else
|
||||||
|
echo "$FILE does not have an XML header, so no changes are necessary."
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "$FILE does not exist, so no changes are necessary."
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user