nicer error message on 'weave status' when there is no weave container.
This commit is contained in:
1 parent
96766db5f0
commit
dbbb8c690a
1 file changed
+4
-1
+4
-1
@@ -87,7 +87,10 @@ case "$COMMAND" in
|
||||
IFACE=eth0
|
||||
;;
|
||||
status)
|
||||
DOCKERIP=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' weave)
|
||||
if ! DOCKERIP=$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' weave 2>/dev/null) ; then
|
||||
echo "There is no weave container." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$DOCKERIP" ] ; then
|
||||
echo "The weave container is not running." >&2
|
||||
exit 1
|
||||
|
||||
Reference in new issue
Block a user