2022-04-22 12:31:57 +00:00
|
|
|
#!/bin/bash
|
2022-05-06 15:03:15 +00:00
|
|
|
|
|
|
|
sleep 10
|
2022-06-09 21:32:46 +00:00
|
|
|
echo "Starting ipld-eth-beacon-indexer"
|
2022-04-22 12:31:57 +00:00
|
|
|
|
2022-10-31 17:36:08 +00:00
|
|
|
cat /root/ipld-eth-beacon-config-docker.json | envsubst > /root/ipld-eth-beacon-config.json
|
|
|
|
|
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-12-06 21:12:48 +00:00
|
|
|
env
|
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-31 17:36:08 +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
|