Merge pull request #789 from rade/784_status_fail

make `weave status` fail when weave isn't running

Closes #784.
This commit is contained in:
Matthias Radestock committed 2015-05-28 23:08:43 +01:00
commit c87da5e873
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 "$@")
;;
status)
http_call $CONTAINER_NAME $HTTP_PORT GET /status || true
res=0
http_call $CONTAINER_NAME $HTTP_PORT GET /status || res=1
echo
http_call $DNS_CONTAINER_NAME $DNS_HTTP_PORT GET /status 2>/dev/null || true
[ $res -eq 0 ]
;;
ps)
[ $# -eq 0 ] && CONTAINERS="weave:expose $(docker ps -q)" || CONTAINERS="$@"