Merge pull request #6180 from Security-Onion-Solutions/issue/5794

timeout wazuh-register-agent faster
This commit is contained in:
Josh Patterson
2021-11-10 09:58:05 -05:00
committed by GitHub

View File

@@ -100,8 +100,8 @@ wait_for_manager() {
echo "Received non-Active status response: "
echo "$AGENTS_OUTPUT"
echo
echo "Manager is not ready after attempt $attempts of $maxAttempts, sleeping for 30 seconds."
sleep 30
echo "Manager is not ready after attempt $attempts of $maxAttempts, sleeping for 15 seconds."
sleep 15
fi
done
return 1
@@ -165,7 +165,7 @@ if [ -f /opt/so/conf/wazuh/initial_agent_registration.log ]; then
echo "Agent $AGENT_ID already registered!"
exit 0
else
retries=30
retries=20
if wait_for_manager $retries; then
if register_agent; then
cleanup_creds