mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
2cb2a6d320
- import dump only if `node` sub command passed - ACC env variable default value is `6000-privnet-blocks.acc.gz` - ACC env variable can be declared in `docker-compose` - ACC env variable can be one of: - `/6000-privnet-blocks.acc.gz` - `/1600-privnet-blocks-single.acc.gz` - custom path to dump of blockchain
19 lines
326 B
Bash
Executable file
19 lines
326 B
Bash
Executable file
#!/bin/sh
|
|
|
|
BIN=/usr/bin/neo-go
|
|
|
|
if [ -z "$ACC"]; then
|
|
ACC=/6000-privnet-blocks.acc.gz
|
|
fi
|
|
|
|
case $@ in
|
|
"node"*)
|
|
echo "=> Try to restore blocks before running node"
|
|
if test -f $ACC; then
|
|
gunzip --stdout /$ACC > /privnet.acc
|
|
${BIN} db restore -p --config-path /config -i /privnet.acc
|
|
fi
|
|
;;
|
|
esac
|
|
|
|
${BIN} "$@"
|