neo-go/.docker/privnet-entrypoint.sh
Roman Khimov 6ea0d87934 docker: remove default ACC value, protect var expansion
The default makes little sense after 9b19b08e06,
but the feature might still be useful.
2020-06-27 11:38:13 +03:00

15 lines
281 B
Bash
Executable file

#!/bin/sh
BIN=/usr/bin/neo-go
case $@ in
"node"*)
echo "=> Try to restore blocks before running node"
if [ -n "$ACC" -a -f "$ACC" ]; then
gunzip --stdout "$ACC" > /privnet.acc
${BIN} db restore -p --config-path /config -i /privnet.acc
fi
;;
esac
${BIN} "$@"