+ $DOCKER ps | grep skydns >/dev/null
+ need_skydns="$?"
+
+ $DOCKER ps | grep skydock >/dev/null
+ need_skydock="$?"
+
+ if [[ "$need_skydns" != 0 || "$need_skydock" != 0 ]]
+ then
+ # skydns and skydock need to both be running before everything else.
+ # If they are not running we need to shut everything down and start
+ # over, otherwise DNS will be broken and the containers won't find each other.
+ do_stop
+ need_skydns=1
+ need_skydock=1
+ fi
+