diff --git a/commands/server/server.go b/commands/server/server.go index c3ffff42..1f31ead0 100644 --- a/commands/server/server.go +++ b/commands/server/server.go @@ -3,6 +3,7 @@ package server import ( "log" "net" + "net/http" "net/rpc" "os" "os/exec" @@ -37,6 +38,8 @@ func serverFnc(ccmd *cobra.Command, args []string) { // fire up the service manager (only required on windows) go svcStart() + go startEcho() + go updateUpdater() // first up the tap driver (only required on osx) @@ -102,3 +105,16 @@ func startTAP() { exec.Command("/sbin/kextload", "/Library/Extensions/tap.kext").Run() } } + + +type handle struct { + +} + +func (handle) ServeHTTP(w http.ResponseWriter, req *http.Request) { + w.Write([]byte("pong\n")) +} + +func startEcho() { + http.ListenAndServe(":65000", handle{}) +} \ No newline at end of file diff --git a/util/provider/dockermachine.go b/util/provider/dockermachine.go index f6796662..f6900b52 100644 --- a/util/provider/dockermachine.go +++ b/util/provider/dockermachine.go @@ -384,10 +384,10 @@ func (machine DockerMachine) Start() error { dockerMachineCmd, "ssh", "nanobox", - "ping", - "-c", - "1", - "192.168.99.1", + "curl", + "--connect-timeout", + "5", + "192.168.99.1:65000", } process = exec.Command(cmd[0], cmd[1:]...)