From aad6579a0babfb8ab08168361f19caa73a5aa8c6 Mon Sep 17 00:00:00 2001 From: Robbie Blaine Date: Sat, 13 Aug 2022 17:01:02 +0200 Subject: [PATCH] Make exporter toggleable --- entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 71c8aa2..d1c5f7b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,9 +1,11 @@ #!/bin/bash -/opt/monero/monero-exporter \ - --bind-addr "${EXPORTER_BIND:-":9000"}" \ - --monero-addr "http://127.0.0.1:18081" \ - --telemetry-path "${EXPORTER_PATH:-"/metrics"}" & +if [ "${EXPORTER_ENABLED:-"true"}" = "true" ]; then + /opt/monero/monero-exporter \ + --bind-addr "${EXPORTER_BIND:-":9000"}" \ + --monero-addr "http://127.0.0.1:18081" \ + --telemetry-path "${EXPORTER_PATH:-"/metrics"}" & +fi /opt/monero/monerod "$@"