2019-11-29 10:36:05 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 10:09:19 +00:00
|
|
|
|
|
|
|
BIN=/usr/bin/neo-go
|
|
|
|
|
2020-06-23 09:08:49 +00:00
|
|
|
if [ -z "$ACC" ]; then
|
2020-01-28 10:09:19 +00:00
|
|
|
ACC=/6000-privnet-blocks.acc.gz
|
2019-11-29 10:36:05 +00:00
|
|
|
fi
|
2020-01-28 10:09:19 +00:00
|
|
|
|
|
|
|
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} "$@"
|