mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-31 06:32:06 +00:00
Merge pull request #136 from dave-tucker/proxy_2
Only watch proxy if keys are in the db
This commit is contained in:
commit
db0ddaa84e
@ -14,17 +14,17 @@ start()
|
|||||||
PIDFILE=/run/hupper.pid
|
PIDFILE=/run/hupper.pid
|
||||||
DOCKERPIDFILE=/run/docker.pid
|
DOCKERPIDFILE=/run/docker.pid
|
||||||
WATCH_CONFIG=$(mobyconfig watch /etc/docker/daemon.json)
|
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_CONFIG}" ] && exit 1
|
||||||
[ -z "${WATCH_PROXY}" ] && exit 1
|
|
||||||
|
|
||||||
start-stop-daemon --start --quiet \
|
start-stop-daemon --start --quiet \
|
||||||
--background \
|
--background \
|
||||||
--exec /bin/hupper \
|
--exec /bin/hupper \
|
||||||
--make-pidfile --pidfile ${PIDFILE} \
|
--make-pidfile --pidfile ${PIDFILE} \
|
||||||
-- -pidfile ${PIDFILE} -huppidfile ${DOCKERPIDFILE} \
|
-- -pidfile ${PIDFILE} -huppidfile ${DOCKERPIDFILE} \
|
||||||
-path ${WATCH_CONFIG} -path ${WATCH_PROXY}
|
-path ${WATCH_CONFIG} ${WATCH_PROXY}
|
||||||
|
|
||||||
eend $? "Failed to start hupper"
|
eend $? "Failed to start hupper"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user