diff --git a/CHANGELOG.md b/CHANGELOG.md index 78d3756..e980f26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ All notable changes to this project will be documented in this file. - Added post-install validations for the Wazuh manager and Filebeat. ([#3059](https://github.com/wazuh/wazuh-packages/pull/3059)) +### Fixed + +- Fixed Wazuh API validation ([#29](https://github.com/wazuh/wazuh-installation-assistant/pull/29)) + ## [4.9.0] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.9.0 diff --git a/install_functions/manager.sh b/install_functions/manager.sh index a33e564..862f76b 100644 --- a/install_functions/manager.sh +++ b/install_functions/manager.sh @@ -47,7 +47,7 @@ function manager_checkService() { eval "TOKEN=$(curl -k -s -X POST -u "wazuh-wui:wazuh-wui" https://127.0.0.1:55000/security/user/authenticate/run_as?raw=true -d '{"user_name":"wzread"}' -H "content-type:application/json")" wm_error=$(curl -k -s -X GET "https://127.0.0.1:55000/agents/outdated?pretty=true" -H "Authorization: Bearer ${TOKEN}") - if [[ ${wm_error,,} = '"error": 0' ]]; then + if [[ ${wm_error,,} =~ '"error": 0' ]]; then common_logger "Wazuh API connection successful" else common_logger -e "Wazuh API connection Error. $wm_error"