mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #6180 from Security-Onion-Solutions/issue/5794
timeout wazuh-register-agent faster
This commit is contained in:
@@ -100,8 +100,8 @@ wait_for_manager() {
|
|||||||
echo "Received non-Active status response: "
|
echo "Received non-Active status response: "
|
||||||
echo "$AGENTS_OUTPUT"
|
echo "$AGENTS_OUTPUT"
|
||||||
echo
|
echo
|
||||||
echo "Manager is not ready after attempt $attempts of $maxAttempts, sleeping for 30 seconds."
|
echo "Manager is not ready after attempt $attempts of $maxAttempts, sleeping for 15 seconds."
|
||||||
sleep 30
|
sleep 15
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
return 1
|
return 1
|
||||||
@@ -165,7 +165,7 @@ if [ -f /opt/so/conf/wazuh/initial_agent_registration.log ]; then
|
|||||||
echo "Agent $AGENT_ID already registered!"
|
echo "Agent $AGENT_ID already registered!"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
retries=30
|
retries=20
|
||||||
if wait_for_manager $retries; then
|
if wait_for_manager $retries; then
|
||||||
if register_agent; then
|
if register_agent; then
|
||||||
cleanup_creds
|
cleanup_creds
|
||||||
|
|||||||
Reference in New Issue
Block a user