From 155676ee21580c4a17e63796572af04233ca9bcd Mon Sep 17 00:00:00 2001 From: Justin Cormack Date: Thu, 9 Feb 2017 13:58:03 +0000 Subject: [PATCH] Do not try to run metrics proxy when not configured Failure test case was not correct; printed a (harmless) error message that was confusing. Signed-off-by: Justin Cormack --- alpine/packages/docker/etc/init.d/docker | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alpine/packages/docker/etc/init.d/docker b/alpine/packages/docker/etc/init.d/docker index 897b688ef..69e78499b 100755 --- a/alpine/packages/docker/etc/init.d/docker +++ b/alpine/packages/docker/etc/init.d/docker @@ -124,8 +124,8 @@ start() # On desktop forward metrics to host if enabled in daemon.json case "$(mobyplatform)" in windows|mac) - METRICS_ADDR=$(cat /etc/docker/daemon.json | jq -r '."metrics-addr"') - if [ -n "$METRICS_ADDR" ] + METRICS_ADDR=$(cat /etc/docker/daemon.json | jq -e -r '."metrics-addr"') + if [ $? -eq 0 ] then METRICS_IP="$(echo "$METRICS_ADDR" | cut -d: -f1)" METRICS_PORT="$(echo "$METRICS_ADDR" | cut -d: -f2)"