lotus/scripts/docker-lotus-entrypoint.sh
KAYUII 4f5fa3be3c
Update docker-lotus-entrypoint.sh
Missing variable escape character
2021-09-07 15:10:43 +08:00

20 lines
533 B
Bash
Executable File

#!/usr/bin/env bash
if [ ! -z $DOCKER_LOTUS_IMPORT_SNAPSHOT ]; then
GATE="$LOTUS_PATH"/date_initialized
# Don't init if already initialized.
if [ ! -f "$GATE" ]; then
echo importing minimal snapshot
/usr/local/bin/lotus daemon --import-snapshot "$DOCKER_LOTUS_IMPORT_SNAPSHOT" --halt-after-import
# Block future inits
date > "$GATE"
fi
fi
# import wallet, if provided
if [ ! -z $DOCKER_LOTUS_IMPORT_WALLET ]; then
/usr/local/bin/lotus-shed keyinfo import "$DOCKER_LOTUS_IMPORT_WALLET"
fi
exec /usr/local/bin/lotus $@