add weave stop-dns

and in the process disentangle stopping dns from `weave stop`
This commit is contained in:
Matthias Radestock committed 2014-11-28 10:13:48 +00:00
1 parent cadf348cbd
commit c070f0b08c
2 files changed
+11 -3

No files matched your search

+9 -3
View File
@@ -16,6 +16,7 @@ usage() {
echo "weave status"
echo "weave version"
echo "weave stop"
echo "weave stop-dns"
echo "weave reset"
echo
echo "where <peer> is of the form <ip_address_or_fqdn>[:<port>], and"
@@ -523,11 +524,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
+2
View File
@@ -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
...
```