When building things on top of the ipfs cli, such as the git-annex integration, it would be useful to have a command that makes sure the daemon is running, starting it up if not, and exits 0 once the daemon is running. This way if the user forgot to start the daemon, ipfs can still be used by the thing built on top of it.
It would be especially nice if the command blocked until the daemon had gotten bootstrapped enough to the DHT that requests for objects were likely to start to succeed.
I want this too. This is really two separate things, a command (or flag to a command) that will start the daemon if its not up already (returning 0 if it is up), and a way for the ipfs daemon command to background itself after bootstrapping.
I would like this too. In the meantime, I'm doing this to block until the daemon is ready:
#!/bin/sh
while ! curl --silent localhost:5001; do
sleep 1
done
This will work best within the https://github.com/ipfs/go-ipfs/milestones/Daemon milestone, as we'll fix various things so we can do this the right way. probably 2-3 weeks out unless another person wants to jump into it and take it on sooner.
in the meantime, may be useful to discuss various approaches, both for doing things "the right way" and "soon" (ideally both).
this could use some thought, it would simplify a lot of tests, and make our sharness stuff a lot nicer
This feature would be really helpful.
What is the progress on this one @whyrusleeping @jbenet ?
There hasn't been any progress.
Most helpful comment
I would like this too. In the meantime, I'm doing this to block until the daemon is ready: