diff --git a/weave b/weave index a07e8926..460ef045 100755 --- a/weave +++ b/weave @@ -16,6 +16,7 @@ usage() { echo "weave status" echo "weave version" echo "weave stop" + echo "weave stop-dns" echo "weave reset" echo echo "where is of the form [:], and" @@ -544,11 +545,16 @@ case "$COMMAND" in if ! docker kill $CONTAINER_NAME >/dev/null 2>&1 ; then echo "Weave is not running." >&2 fi - docker kill $DNS_CONTAINER_NAME >/dev/null 2>&1 || true - docker rm -f $CONTAINER_NAME >/dev/null 2>&1 || true - docker rm -f $DNS_CONTAINER_NAME >/dev/null 2>&1 || true + docker rm -f $CONTAINER_NAME >/dev/null 2>&1 || true check_command_and_run conntrack -D -p udp --dport $PORT >/dev/null 2>&1 || true ;; + stop-dns) + [ $# -eq 0 ] || usage + if ! docker kill $DNS_CONTAINER_NAME >/dev/null 2>&1 ; then + echo "WeaveDNS is not running." >&2 + fi + docker rm -f $DNS_CONTAINER_NAME >/dev/null 2>&1 || true + ;; reset) [ $# -eq 0 ] || usage docker kill $CONTAINER_NAME >/dev/null 2>&1 || true diff --git a/weavedns/README.md b/weavedns/README.md index 71e5e2c6..d1f1073a 100644 --- a/weavedns/README.md +++ b/weavedns/README.md @@ -20,6 +20,8 @@ $ weave run 10.1.1.25/24 -ti -h pingme.weave.local ubuntu $ shell1=$(weave run --with-dns 10.1.1.26/24 -ti -h ubuntu.weave.local ubuntu) $ docker attach $shell1 +The DNS container can be stopped with `stop-dns`. + # ping pingme ... ```