diff --git a/salt/common/tools/sbin/soup b/salt/common/tools/sbin/soup index b497d9c24..8f1e77d7f 100755 --- a/salt/common/tools/sbin/soup +++ b/salt/common/tools/sbin/soup @@ -837,6 +837,21 @@ 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 + else + echo "$FILE does not have an XML header, so no changes are necessary." + fi + fi +} + + main() { trap 'check_err $?' EXIT @@ -893,6 +908,7 @@ main() { if [ "$is_hotfix" == "true" ]; then echo "Applying $HOTFIXVERSION" copy_new_files + apply_hotfix echo "" update_version salt-call state.highstate -l info queue=True