From aa1f50d8ddae40a5f04e44b6a53741b95337782e Mon Sep 17 00:00:00 2001 From: Sarah Date: Mon, 5 Dec 2022 13:41:24 -0500 Subject: [PATCH] Wait for token as well --- lib/scripts/update_agent_config.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/scripts/update_agent_config.sh b/lib/scripts/update_agent_config.sh index 36ccdc8..c85e47f 100644 --- a/lib/scripts/update_agent_config.sh +++ b/lib/scripts/update_agent_config.sh @@ -8,11 +8,14 @@ main() { timeout=0 while [ $timeout -lt 120 ]; do - echo "Waiting for agent process to start" + echo "Waiting for agent or dogstatsd process to start" if pgrep -f ./agent; then echo "Found agent process" - break + if test -f "/home/vcap/app/.datadog/dist/auth_token"; then + echo "Found agent token" + break + fi fi if pgrep -f ./dogstatsd; then