introduce 'weave hide'
This commit is contained in:
1 parent
d0dc7b7556
commit
0767964934
2 files changed
+13
-1
No files matched your search
@@ -198,7 +198,8 @@ application containers. On $HOST2 we run
|
|||||||
|
|
||||||
host2# weave expose 10.0.1.102/24
|
host2# weave expose 10.0.1.102/24
|
||||||
|
|
||||||
choosing an unused IP address in the application subnet.
|
choosing an unused IP address in the application subnet. (There is a
|
||||||
|
corresponding 'hide' command to revert this step.)
|
||||||
|
|
||||||
Now
|
Now
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ usage() {
|
|||||||
echo "weave launch <ipaddr>/<subnet> [-passwd <passwd>] <peer_host> ..."
|
echo "weave launch <ipaddr>/<subnet> [-passwd <passwd>] <peer_host> ..."
|
||||||
echo "weave run <ipaddr>/<subnet> <docker run args> ..."
|
echo "weave run <ipaddr>/<subnet> <docker run args> ..."
|
||||||
echo "weave expose <ipaddr>/<subnet>"
|
echo "weave expose <ipaddr>/<subnet>"
|
||||||
|
echo "weave hide <ipaddr>/<subnet>"
|
||||||
echo "weave stop"
|
echo "weave stop"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -89,6 +90,16 @@ case "$COMMAND" in
|
|||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
hide)
|
||||||
|
[ $# -gt 0 ] || usage
|
||||||
|
IPADDR=$1
|
||||||
|
shift 1
|
||||||
|
if ip addr list dev $BRIDGE | grep -qF $IPADDR
|
||||||
|
then
|
||||||
|
ip addr del dev $BRIDGE $IPADDR
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
stop)
|
stop)
|
||||||
docker kill weave > /dev/null
|
docker kill weave > /dev/null
|
||||||
docker rm weave > /dev/null
|
docker rm weave > /dev/null
|
||||||
|
|||||||
Reference in new issue
Block a user