From 0b37220205715c78f5846844c74956893d8c6b17 Mon Sep 17 00:00:00 2001 From: n-hutton Date: Thu, 10 Sep 2020 11:47:52 +0100 Subject: [PATCH] don't allow entrypoint script to fail when data dir isn't there (#23) --- entrypoints/run-node.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/entrypoints/run-node.sh b/entrypoints/run-node.sh index 04f11356..38ea56eb 100755 --- a/entrypoints/run-node.sh +++ b/entrypoints/run-node.sh @@ -25,6 +25,7 @@ else fetchd start --p2p.laddr tcp://127.0.0.1:26656 --rpc.laddr tcp://127.0.0.1:26657 ${P2PPEX} ${PERSPEERS} ${PRIVPEERS} ${SEEDMODE} ${SEEDS} ${PRUNING} else VALIDATOR_STATE_FILE="/root/.fetchd/data/priv_validator_state.json" + VALIDATOR_STATE_DIR="/root/.fetchd/data" # Copy readonly values from configmap dir to /root/.gaiad/config mkdir -p /root/.fetchd/config @@ -41,6 +42,7 @@ else ## if [ ! -f "$VALIDATOR_STATE_FILE" ]; then + mkdir $VALIDATOR_STATE_DIR echo "$VALIDATOR_STATE_FILE not found" echo "---" echo "Creating priv_validator_state.json" @@ -54,4 +56,4 @@ else fetchd start --p2p.laddr tcp://127.0.0.1:26656 --rpc.laddr tcp://127.0.0.1:26657 ${P2PPEX} ${PERSPEERS} ${PRIVPEERS} ${SEEDMODE} ${SEEDS} ${PRUNING} fi -fi \ No newline at end of file +fi