From 7728e75f070e6b31ff1eace2338dcd38403a17b2 Mon Sep 17 00:00:00 2001 From: Ben Newton Date: Tue, 2 Jan 2018 14:51:59 +0000 Subject: [PATCH] Accept API key as an argument Trying to get the agent to install using AWS SSM was proving troublesome. This allows the user to pass the variable directly to the script, making the one liner even more one-linerier --- packaging/datadog-agent/source/install_agent.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/datadog-agent/source/install_agent.sh b/packaging/datadog-agent/source/install_agent.sh index c30b5dcd0d..fc0b693e90 100755 --- a/packaging/datadog-agent/source/install_agent.sh +++ b/packaging/datadog-agent/source/install_agent.sh @@ -47,6 +47,8 @@ fi if [ -n "$DD_API_KEY" ]; then apikey=$DD_API_KEY +elif [ $1 ]; then + apikey=$1 fi if [ -n "$DD_INSTALL_ONLY" ]; then