From 46d7ca066b7a5b2f437abd0019ce4bdeda457d3d Mon Sep 17 00:00:00 2001 From: nina9753 Date: Fri, 12 Jul 2024 17:21:57 -0400 Subject: [PATCH 01/12] test adding check for binaries in original if statement --- datadog_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_wrapper b/datadog_wrapper index 618ae98..b0b4c18 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -109,7 +109,7 @@ getRuntimeDependencies() { getBinaries() { #Check if we have already installed this version - if [ ! -d "${DD_BINARY_DIR}" ]; then + if [ ! -d "${DD_BINARY_DIR}" -a -d "${DD_BINARIES_URL}"]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From d6b958203b97b4c7b0629b46333407b7346a6b4c Mon Sep 17 00:00:00 2001 From: nina9753 Date: Mon, 15 Jul 2024 14:24:00 -0400 Subject: [PATCH 02/12] test binaries --- datadog_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_wrapper b/datadog_wrapper index b0b4c18..820a4a6 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -109,7 +109,7 @@ getRuntimeDependencies() { getBinaries() { #Check if we have already installed this version - if [ ! -d "${DD_BINARY_DIR}" -a -d "${DD_BINARIES_URL}"]; then + if [ ! -d "${DD_BINARY_DIR}" ! -a "${DD_BINARIES_URL}"]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From 352095b40ad4a7576798c15e12998a868b0542d0 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Mon, 15 Jul 2024 14:28:55 -0400 Subject: [PATCH 03/12] test binaries p2 --- datadog_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_wrapper b/datadog_wrapper index 820a4a6..c1747c8 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -109,7 +109,7 @@ getRuntimeDependencies() { getBinaries() { #Check if we have already installed this version - if [ ! -d "${DD_BINARY_DIR}" ! -a "${DD_BINARIES_URL}"]; then + if [ ! -d "${DD_BINARY_DIR}" -a ! "${DD_BINARIES_URL}"]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From a4212b5a616dcf5ed61f623b8dd275d8036bf3a6 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Mon, 15 Jul 2024 14:44:37 -0400 Subject: [PATCH 04/12] test binaries p2 bi binaries --- datadog_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_wrapper b/datadog_wrapper index c1747c8..40ea8ee 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -109,7 +109,7 @@ getRuntimeDependencies() { getBinaries() { #Check if we have already installed this version - if [ ! -d "${DD_BINARY_DIR}" -a ! "${DD_BINARIES_URL}"]; then + if [ ! -d "${DD_BINARY_DIR}" -a ! -d "${DD_BINARIES_URL}"]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From a190173aec1cfdbe9b90aad889c7cc30068b75d8 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Tue, 16 Jul 2024 13:22:27 -0400 Subject: [PATCH 05/12] final version --- datadog_wrapper | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index 40ea8ee..3a43396 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -68,7 +68,7 @@ setEnvVars() { DD_AAS_LINUX_VERSION="v1.10.6" fi - if [ -z "${DD_TRACE_LOG_DIRECTORY}"]; then + if [ -z "${DD_TRACE_LOG_DIRECTORY}" ]; then DD_TRACE_LOG_DIRECTORY="/home/LogFiles/datadog/${DD_AAS_LINUX_VERSION}" fi @@ -108,8 +108,8 @@ getRuntimeDependencies() { } getBinaries() { - #Check if we have already installed this version - if [ ! -d "${DD_BINARY_DIR}" -a ! -d "${DD_BINARIES_URL}"]; then + #Check if we have already installed this version and if we successfully downloaded binaries from the URL + if [ ! -d "${DD_BINARY_DIR}" -a -d "${DD_BINARIES_URL}" ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From 02d4319caaebf6e306b4042bd96b18ac1e942529 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Tue, 16 Jul 2024 14:03:57 -0400 Subject: [PATCH 06/12] update spacing of comment --- datadog_wrapper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index 3a43396..71be3f3 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -108,8 +108,8 @@ getRuntimeDependencies() { } getBinaries() { - #Check if we have already installed this version and if we successfully downloaded binaries from the URL - if [ ! -d "${DD_BINARY_DIR}" -a -d "${DD_BINARIES_URL}" ]; then + # Check if we have already installed this version and if we successfully downloaded binaries from the URL + if [ ! -d "${DD_BINARY_DIR}" -a ! -d "${DD_BINARIES_URL}" ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From dbd7ff7f2620380b2322a33d784686b160a4654c Mon Sep 17 00:00:00 2001 From: nina9753 Date: Tue, 16 Jul 2024 16:02:36 -0400 Subject: [PATCH 07/12] update to check for DD_AAS_LINUX_VERSION directory currently v1.10.6 --- datadog_wrapper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index 71be3f3..dd5759a 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -108,8 +108,8 @@ getRuntimeDependencies() { } getBinaries() { - # Check if we have already installed this version and if we successfully downloaded binaries from the URL - if [ ! -d "${DD_BINARY_DIR}" -a ! -d "${DD_BINARIES_URL}" ]; then + # Check if we have already installed this version and if we successfully downloaded binaries before + if [ ! -d "${DD_BINARY_DIR}" -a ! -d "${DD_AAS_LINUX_VERSION}" ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From 9f6646b457b4fe07467e7d325dcc894bdf0002c8 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Wed, 17 Jul 2024 10:42:35 -0400 Subject: [PATCH 08/12] update to check if DD_AAS_LINUX_VERSION directory is empty --- datadog_wrapper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index dd5759a..cd9b718 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -108,8 +108,8 @@ getRuntimeDependencies() { } getBinaries() { - # Check if we have already installed this version and if we successfully downloaded binaries before - if [ ! -d "${DD_BINARY_DIR}" -a ! -d "${DD_AAS_LINUX_VERSION}" ]; then + # Check if we have already installed this version or if we successfully downloaded binaries before + if [ ! -d "${DD_BINARY_DIR}" ] || [ -z "$(ls -A "${DD_BINARY_DIR}")" ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From 3eec58b418fdc11e247b5c39aabcfb80cf25eb79 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Wed, 17 Jul 2024 11:29:06 -0400 Subject: [PATCH 09/12] look for specific file --- datadog_wrapper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index cd9b718..5c619e2 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -108,8 +108,8 @@ getRuntimeDependencies() { } getBinaries() { - # Check if we have already installed this version or if we successfully downloaded binaries before - if [ ! -d "${DD_BINARY_DIR}" ] || [ -z "$(ls -A "${DD_BINARY_DIR}")" ]; then + # Check if we have already installed this version or if we successfully downloaded datadog yaml before + if [ ! -d "${DD_BINARY_DIR}" ] || [ -f "${DD_BINARY_DIR}"/datadog.yaml ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From 6f75196660a2387870e7b941ec24da1fb4c7408c Mon Sep 17 00:00:00 2001 From: nina9753 Date: Wed, 17 Jul 2024 11:37:25 -0400 Subject: [PATCH 10/12] change back to -o --- datadog_wrapper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datadog_wrapper b/datadog_wrapper index 5c619e2..4eaf0ef 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -108,8 +108,8 @@ getRuntimeDependencies() { } getBinaries() { - # Check if we have already installed this version or if we successfully downloaded datadog yaml before - if [ ! -d "${DD_BINARY_DIR}" ] || [ -f "${DD_BINARY_DIR}"/datadog.yaml ]; then + # Check if we have already installed this version or if we successfully downloaded binaries before + if [ ! -d "${DD_BINARY_DIR}" -o -z "$(ls -A "${DD_BINARY_DIR}")" ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From edc2e3bcc9fbb9627899c962cb87398fcb076aa5 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Wed, 17 Jul 2024 11:52:17 -0400 Subject: [PATCH 11/12] change back to check for one file --- datadog_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_wrapper b/datadog_wrapper index 4eaf0ef..91a27c8 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -109,7 +109,7 @@ getRuntimeDependencies() { getBinaries() { # Check if we have already installed this version or if we successfully downloaded binaries before - if [ ! -d "${DD_BINARY_DIR}" -o -z "$(ls -A "${DD_BINARY_DIR}")" ]; then + if [ ! -d "${DD_BINARY_DIR}" -o -f "${DD_BINARY_DIR}"/datadog.yaml ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip" From 541cd8720b86cac98d46062118c847654c4e3bd2 Mon Sep 17 00:00:00 2001 From: nina9753 Date: Wed, 17 Jul 2024 12:58:57 -0400 Subject: [PATCH 12/12] test ls -A --- datadog_wrapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datadog_wrapper b/datadog_wrapper index 91a27c8..4eaf0ef 100644 --- a/datadog_wrapper +++ b/datadog_wrapper @@ -109,7 +109,7 @@ getRuntimeDependencies() { getBinaries() { # Check if we have already installed this version or if we successfully downloaded binaries before - if [ ! -d "${DD_BINARY_DIR}" -o -f "${DD_BINARY_DIR}"/datadog.yaml ]; then + if [ ! -d "${DD_BINARY_DIR}" -o -z "$(ls -A "${DD_BINARY_DIR}")" ]; then FILE="datadog-aas-${DD_AAS_LINUX_VERSION}.zip"