Skip to content

Commit

Permalink
don't allow entrypoint script to fail when data dir isn't there (fetc…
Browse files Browse the repository at this point in the history
  • Loading branch information
n-hutton authored and jinmannwong committed Sep 22, 2020
1 parent 01fa057 commit d0ebcb0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion entrypoints/run-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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
fi

0 comments on commit d0ebcb0

Please sign in to comment.