From 1f0f7c5d1c889ae65281d8ee3903ff855541a3c3 Mon Sep 17 00:00:00 2001 From: tanlang Date: Fri, 1 Jul 2022 14:29:54 +0800 Subject: [PATCH] feat: make snapshot optional --- docker/script/compose.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker/script/compose.sh b/docker/script/compose.sh index 2364c73853..30135738b7 100755 --- a/docker/script/compose.sh +++ b/docker/script/compose.sh @@ -8,4 +8,11 @@ fi echo "nettype:" echo $nettype -./venus daemon --network=${nettype} --auth-url=http://127.0.0.1:8989 --import-snapshot /snapshot.car + +if [ -d "/snapshot.car" ] +then + echo "snapshot.car exists" + ./venus daemon --network=${nettype} --auth-url=http://127.0.0.1:8989 --import-snapshot /snapshot.car +else + echo "snapshot.car not found" + ./venus daemon --network=${nettype} --auth-url=http://127.0.0.1:8989