mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Don't sleep if not registering agent
This commit is contained in:
@@ -136,13 +136,12 @@ shift $(($OPTIND - 1))
|
|||||||
# fi
|
# fi
|
||||||
# fi
|
# fi
|
||||||
|
|
||||||
# Default action -> try to register the agent
|
|
||||||
echo "Waiting before registering agent..."
|
|
||||||
sleep 30s
|
|
||||||
if [ -f /opt/so/conf/wazuh/initial_agent_registration.log ]; then
|
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
|
||||||
|
echo "Waiting before registering agent..."
|
||||||
|
sleep 30s
|
||||||
register_agent
|
register_agent
|
||||||
cleanup_creds
|
cleanup_creds
|
||||||
echo "Initial agent $AGENT_ID with IP $AGENT_IP registered on $DATE." > /opt/so/conf/wazuh/initial_agent_registration.log
|
echo "Initial agent $AGENT_ID with IP $AGENT_IP registered on $DATE." > /opt/so/conf/wazuh/initial_agent_registration.log
|
||||||
|
|||||||
Reference in New Issue
Block a user