Skip to content

Commit

Permalink
Fixed Wazuh API validation
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcr01 committed Aug 20, 2024
1 parent 8121896 commit e1d5ea1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install_functions/manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e1d5ea1

Please sign in to comment.