From 6ea0d87934f87b5379d8ee6582791c9061e460de Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Sat, 27 Jun 2020 11:38:13 +0300 Subject: [PATCH] docker: remove default ACC value, protect var expansion The default makes little sense after 9b19b08e068707380f8158310dc12c7fe2dd42a6, but the feature might still be useful. --- .docker/privnet-entrypoint.sh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.docker/privnet-entrypoint.sh b/.docker/privnet-entrypoint.sh index 3baffe9cf..d59632169 100755 --- a/.docker/privnet-entrypoint.sh +++ b/.docker/privnet-entrypoint.sh @@ -2,15 +2,11 @@ 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 + if [ -n "$ACC" -a -f "$ACC" ]; then + gunzip --stdout "$ACC" > /privnet.acc ${BIN} db restore -p --config-path /config -i /privnet.acc fi ;;