From 61634d2aff7482edc70ae8ba0a72aa2f7ba5d731 Mon Sep 17 00:00:00 2001
From: Dave Tucker
Date: Wed, 18 May 2016 11:18:43 +0100
Subject: [PATCH] Only watch proxy if keys are in the db
My last change fails if the proxy keys aren't in the db...
Signed-off-by: Dave Tucker
---
alpine/packages/hupper/etc/init.d/hupper | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/alpine/packages/hupper/etc/init.d/hupper b/alpine/packages/hupper/etc/init.d/hupper
index 9dfdcd2d1..cac794b47 100755
--- a/alpine/packages/hupper/etc/init.d/hupper
+++ b/alpine/packages/hupper/etc/init.d/hupper
@@ -14,17 +14,17 @@ start()
PIDFILE=/run/hupper.pid
DOCKERPIDFILE=/run/docker.pid
WATCH_CONFIG=$(mobyconfig watch /etc/docker/daemon.json)
- WATCH_PROXY=$(mobyconfig watch proxy)
-
+ WATCH_PROXY=""
+ PROXY="$(mobyconfig watch proxy)"
+ [ -n "${PROXY}" ] && WATCH_PROXY="-path ${PROXY}"
[ -z "${WATCH_CONFIG}" ] && exit 1
- [ -z "${WATCH_PROXY}" ] && exit 1
start-stop-daemon --start --quiet \
--background \
--exec /bin/hupper \
--make-pidfile --pidfile ${PIDFILE} \
-- -pidfile ${PIDFILE} -huppidfile ${DOCKERPIDFILE} \
- -path ${WATCH_CONFIG} -path ${WATCH_PROXY}
+ -path ${WATCH_CONFIG} ${WATCH_PROXY}
eend $? "Failed to start hupper"
}