mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Merge pull request #6329 from Security-Onion-Solutions/kilo
2.3.90 WAZUH
This commit is contained in:
@@ -837,6 +837,24 @@ 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
|
||||||
|
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() {
|
main() {
|
||||||
trap 'check_err $?' EXIT
|
trap 'check_err $?' EXIT
|
||||||
|
|
||||||
@@ -891,9 +909,10 @@ main() {
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ "$is_hotfix" == "true" ]; then
|
if [ "$is_hotfix" == "true" ]; then
|
||||||
echo "Applying $HOTFIXVERSION"
|
echo "Applying $HOTFIXVERSION hotfix"
|
||||||
copy_new_files
|
copy_new_files
|
||||||
echo ""
|
apply_hotfix
|
||||||
|
echo "Hotfix applied"
|
||||||
update_version
|
update_version
|
||||||
salt-call state.highstate -l info queue=True
|
salt-call state.highstate -l info queue=True
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user