2022-04-22 12:31:57 +00:00
|
|
|
#!/bin/bash
|
2022-05-06 15:03:15 +00:00
|
|
|
|
|
|
|
sleep 10
|
2022-10-11 21:01:30 +00:00
|
|
|
sleep "Starting ipld-eth-beacon-indexer"
|
|
|
|
|
|
|
|
cat /root/ipld-eth-beacon-config-docker.json | envsubst > /root/ipld-eth-beacon-config.json
|
2022-04-22 12:31:57 +00:00
|
|
|
|
2022-06-14 13:06:51 +00:00
|
|
|
echo /root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json > /root/ipld-eth-beacon-indexer.output
|
2022-04-22 12:31:57 +00:00
|
|
|
|
2022-06-15 15:49:30 +00:00
|
|
|
if [ ${CAPTURE_MODE} == "boot" ]; then
|
|
|
|
/root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json > /root/ipld-eth-beacon-indexer.output
|
|
|
|
rv=$?
|
2022-04-22 12:31:57 +00:00
|
|
|
|
2022-06-15 15:49:30 +00:00
|
|
|
if [ $rv != 0 ]; then
|
|
|
|
echo "ipld-eth-beacon-indexer boot failed"
|
|
|
|
else
|
|
|
|
echo "ipld-eth-beacon-indexer boot succeeded"
|
|
|
|
fi
|
2022-10-11 21:01:30 +00:00
|
|
|
|
|
|
|
echo $rv > /root/HEALTH
|
|
|
|
echo $rv
|
|
|
|
cat /root/ipld-eth-beacon-indexer.output
|
2022-04-22 12:31:57 +00:00
|
|
|
|
2022-06-15 15:49:30 +00:00
|
|
|
tail -f /dev/null
|
|
|
|
else
|
2022-09-29 01:39:56 +00:00
|
|
|
exec /root/ipld-eth-beacon-indexer capture ${CAPTURE_MODE} --config /root/ipld-eth-beacon-config.json > /dev/null &
|
|
|
|
tail -F ipld-eth-beacon-indexer.log
|
|
|
|
fi
|