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