From 55b402aad03af5143633a408f2cc44d7f09f4e5d Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 26 Aug 2020 14:20:04 +0100 Subject: [PATCH] Update command_monitor.sh --- lgsm/functions/command_monitor.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index e8119be3b..d620473a1 100644 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -254,14 +254,14 @@ if [ "${querymode}" != "1" ]; then # In some complex networking cases, when listening on 0.0.0.0, not all addresses can be used when monitoring. # In those cases you sometimes know one IP that will work before starting the container. # Allowing a "query ip" to be set allows binding to 0.0.0.0 while testing against a specfic ip - # TODO: LGSM_MONITOR_IP should be configured like all other LGSM settings, reading this from an env is hacky - if [[ -n "${LGSM_MONITOR_IP}" ]]; then - query_ip="${LGSM_MONITOR_IP}" - elif [[ ${query_ip} == "0.0.0.0" ]]; then + # TODO: MONITOR_IP should be configured like all other LGSM settings, reading this from an env is hacky + if [ -n "${MONITOR_IP}" ]; then + query_ip="${MONITOR_IP}" + elif [ "${query_ip}" == "0.0.0.0" ]; then # When binding to all addresses, any of them can be used for testing query_ip="$(hostname -i)" else - query_ip=${ip} + query_ip="${ip}" fi fn_monitor_loop