#!/bin/sh set -e set -u cmd="$@" echo 'Waiting for the Grid...' while ! curl -sSL "${SELENIUM_GRID_URL}/status" 2>&1 \ | jq -r '.value.ready' 2>&1 | grep "true" > /dev/null; do sleep 1 done exec $cmd