From 0005715b1ad80f5a6647427bdf83229a7efd5638 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Wed, 18 Mar 2015 14:49:48 +0000 Subject: [PATCH] Weave status only returns success if both router and DNS are up --- weave | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/weave b/weave index 4f344e5a..a33bc111 100755 --- a/weave +++ b/weave @@ -555,9 +555,10 @@ case "$COMMAND" in http_call $CONTAINER_NAME $HTTP_PORT POST /connect -d "peer=$1" ;; status) - http_call $CONTAINER_NAME $HTTP_PORT GET /status || true + if http_call $CONTAINER_NAME $HTTP_PORT GET /status; then ROUTER_UP=true; else ROUTER_UP=false; fi echo - http_call $DNS_CONTAINER_NAME $DNS_HTTP_PORT GET /status + if http_call $DNS_CONTAINER_NAME $DNS_HTTP_PORT GET /status; then DNS_UP=true; else DNS_UP=false; fi + $ROUTER_UP && $DNS_UP ;; ps) [ $# -eq 0 ] || usage