2021-06-21 19:48:07 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-09-07 07:11:29 +00:00
|
|
|
if [ ! -z $DOCKER_LOTUS_MINER_INIT ]; then
|
2021-06-21 19:48:07 +00:00
|
|
|
GATE="$LOTUS_PATH"/date_initialized
|
|
|
|
|
|
|
|
# Don't init if already initialized.
|
2021-09-07 07:11:29 +00:00
|
|
|
if [ -f "$GATE" ]; then
|
2021-06-21 19:48:07 +00:00
|
|
|
echo lotus-miner already initialized.
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo starting init
|
|
|
|
/usr/local/bin/lotus-miner init
|
|
|
|
|
|
|
|
# Block future inits
|
|
|
|
date > "$GATE"
|
|
|
|
fi
|
|
|
|
|
|
|
|
exec /usr/local/bin/lotus-miner $@
|