Merge pull request #6329 from Security-Onion-Solutions/kilo

2.3.90 WAZUH
This commit is contained in:
Mike Reeves
2021-11-23 13:37:41 -05:00
committed by GitHub
2 changed files with 22 additions and 3 deletions

View File

@@ -837,6 +837,24 @@ verify_latest_update_script() {
fi
}
apply_hotfix() {
if [[ "$INSTALLEDVERSION" == "2.3.90" && "$HOTFIXVERSION" == "WAZUH" ]] ; then
FILE="/nsm/wazuh/etc/ossec.conf"
echo "Detecting if ossec.conf needs corrected..."
WAZUHHEADER=$(head -1 $FILE | grep "xml version")
if [[ ! -z "$WAZUHHEADER" ]]; then
echo "$FILE has an XML header; removing"
sed -i 1d $FILE
so-wazuh-restart
else
echo "$FILE does not have an XML header, so no changes are necessary."
fi
else
echo "Skipping ossec.conf check ($INSTALLEDVERSION/$HOTFIXVERSION)"
fi
}
main() {
trap 'check_err $?' EXIT
@@ -891,9 +909,10 @@ main() {
set -e
if [ "$is_hotfix" == "true" ]; then
echo "Applying $HOTFIXVERSION"
echo "Applying $HOTFIXVERSION hotfix"
copy_new_files
echo ""
apply_hotfix
echo "Hotfix applied"
update_version
salt-call state.highstate -l info queue=True
else