2019-11-29 10:36:05 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 10:09:19 +00:00
|
|
|
|
|
|
|
BIN=/usr/bin/neo-go
|
|
|
|
|
|
|
|
if [ -z "$ACC"]; then
|
|
|
|
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} "$@"
|