From e1d5ea158eb0899f7bc4a99128478c19e4f44d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Tue, 20 Aug 2024 13:05:00 +0200 Subject: [PATCH] Fixed Wazuh API validation --- install_functions/manager.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"