2019-11-29 10:36:05 +00:00
|
|
|
#!/bin/sh
|
2020-01-28 10:09:19 +00:00
|
|
|
|
|
|
|
BIN=/usr/bin/neo-go
|
|
|
|
|
|
|
|
case $@ in
|
|
|
|
"node"*)
|
|
|
|
echo "=> Try to restore blocks before running node"
|
2020-06-27 08:38:13 +00:00
|
|
|
if [ -n "$ACC" -a -f "$ACC" ]; then
|
|
|
|
gunzip --stdout "$ACC" > /privnet.acc
|
2020-01-28 10:09:19 +00:00
|
|
|
${BIN} db restore -p --config-path /config -i /privnet.acc
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
${BIN} "$@"
|