On 10.02.2015 02:55, Buck Evan wrote:
Essentially, if `sv check` is run too soon after `runsv` (or runit for that
matter), it will immediately fail without waiting for runsv to come up. In
my particular use case, runit is running inside a (detached) docker, and
I'm using `sv check` to wait for my dockerized service to be ready, which I
think is a good use case for `sv check`. Without this patch, I'm forced to
write some code which re-runs `sv check` if it fails before $SVWAIT
seconds, which sounds awfully like the behavior of sv-check itself.
I use something like this in my ./run scripts:
NAME='foo'
DEPS='baz baz'
export SVWAIT=1
while ! sv start $DEPS >/dev/null
do
echo "Waiting for $DEPS required by $NAME."
done
unset SVWAIT
Don't use this unless your service has a ./check script because it
blocks the service until the dependencies are met.