make weave status fail when weave isn't running

but still always show weavedns status, if present

Closes #784.
This commit is contained in:
Matthias Radestock committed 2015-05-28 21:41:56 +01:00
1 parent e3e5934c51
commit b0633281a1
1 file changed
+3 -1
+3 -1
View File
@@ -894,9 +894,11 @@ case "$COMMAND" in
http_call $CONTAINER_NAME $HTTP_PORT POST /forget -d $(peer_args "$@") http_call $CONTAINER_NAME $HTTP_PORT POST /forget -d $(peer_args "$@")
;; ;;
status) status)
http_call $CONTAINER_NAME $HTTP_PORT GET /status || true res=0
http_call $CONTAINER_NAME $HTTP_PORT GET /status || res=1
echo echo
http_call $DNS_CONTAINER_NAME $DNS_HTTP_PORT GET /status 2>/dev/null || true http_call $DNS_CONTAINER_NAME $DNS_HTTP_PORT GET /status 2>/dev/null || true
[ $res -eq 0 ]
;; ;;
ps) ps)
[ $# -eq 0 ] && CONTAINERS="weave:expose $(docker ps -q)" || CONTAINERS="$@" [ $# -eq 0 ] && CONTAINERS="weave:expose $(docker ps -q)" || CONTAINERS="$@"