mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 02:02:50 +01:00
Add 2.3.90 WAZUH hotfix corrective function
This commit is contained in:
@@ -837,6 +837,21 @@ verify_latest_update_script() {
|
|||||||
fi
|
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() {
|
main() {
|
||||||
trap 'check_err $?' EXIT
|
trap 'check_err $?' EXIT
|
||||||
|
|
||||||
@@ -893,6 +908,7 @@ main() {
|
|||||||
if [ "$is_hotfix" == "true" ]; then
|
if [ "$is_hotfix" == "true" ]; then
|
||||||
echo "Applying $HOTFIXVERSION"
|
echo "Applying $HOTFIXVERSION"
|
||||||
copy_new_files
|
copy_new_files
|
||||||
|
apply_hotfix
|
||||||
echo ""
|
echo ""
|
||||||
update_version
|
update_version
|
||||||
salt-call state.highstate -l info queue=True
|
salt-call state.highstate -l info queue=True
|
||||||
|
|||||||
Reference in New Issue
Block a user