Remove proxy status.sock

This commit is contained in:
Bryan Boreham committed 2017-05-13 16:31:16 +01:00
1 parent 6ba2bf80b8
commit bf3ecaf48a
3 files changed
+5 -28

No files matched your search

+1 -15
View File
@@ -661,19 +661,6 @@ http_call() {
return $retval
}
http_call_unix() {
container="$1"
socket="$2"
http_verb="$3"
url="$4"
shift 4
# NB: requires curl >= 7.40
output=$(docker exec $container curl -s -S -X $http_verb --unix-socket $socket "$@" http:$url) || return 1
# in some docker versions, `docker exec` does not fail when the executed command fails
[ -n "$output" ] || return 1
echo $output
}
call_weave() {
TMPERR=/tmp/call_weave_err_$$
retval=0
@@ -1166,10 +1153,9 @@ proxy_args() {
}
proxy_addrs() {
if addr="$(http_call_unix $CONTAINER_NAME status.sock GET /status 2>/dev/null)" ; then
if addr="$(call_weave GET /proxyaddrs)" ; then
echo "$addr" | sed "s/0.0.0.0/$PROXY_HOST/g"
else
echo "$CONTAINER_NAME container is not present. Have you launched it?" >&2
return 1
fi
}