2021-02-01 18:12:51 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-09-22 16:34:12 +02:00
|
|
|
set -e
|
|
|
|
set -u
|
|
|
|
|
2021-02-01 18:12:51 +01:00
|
|
|
. ./db.sh
|
|
|
|
|
2021-09-22 16:34:12 +02:00
|
|
|
WAIT_FOR_TIMEOUT=${WAIT_FOR_TIMEOUT:-600}
|
|
|
|
|
|
|
|
if [[ "$CONTRACT_MIGRATION_URL" ]]; then
|
|
|
|
echo "waiting for $CONTRACT_MIGRATION_URL/readyz"
|
|
|
|
./wait-for-it.sh $CONTRACT_MIGRATION_URL -t $WAIT_FOR_TIMEOUT
|
|
|
|
source ./get_readyz.sh # set env vars form endpoint
|
|
|
|
/usr/local/bin/cic-eth-dispatcherd $@
|
|
|
|
else
|
|
|
|
/usr/local/bin/cic-eth-dispatcherd $@
|
|
|
|
fi
|