Skip to content

Commit fc19b9a

Browse files
authored
fix: stop on genesis overwrite failure (#85)
1 parent 2fb459f commit fc19b9a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

entrypoints/run-node.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ else
2828
VALIDATOR_STATE_DIR="/root/.fetchd/data"
2929

3030
# Copy readonly values from configmap dir to /root/.gaiad/config
31-
mkdir -p /root/.fetchd/config
31+
if [ ! -d /root/.fetchd/config ]; then
32+
mkdir -p /root/.fetchd/config
33+
fi
3234
cp /root/wasm-temp-config/* /root/.fetchd/config/
3335
cp /root/secret-temp-config/* /root/.fetchd/config/
3436
chmod 644 /root/.fetchd/config/*
@@ -44,6 +46,10 @@ else
4446
then
4547
echo "Overwritting genesis.json from ${OVERWRITE_GENESIS_URL}"
4648
curl -o ~/.fetchd/config/genesis.json "${OVERWRITE_GENESIS_URL}"
49+
if [ $? -ne 0 ]; then
50+
echo "failed to download genesis.json"
51+
exit 1
52+
fi
4753
fi
4854

4955
##

0 commit comments

Comments
 (0)