Browse Source

Merge e3881e7846 into e4ae922c33

pull/8163/merge
Simon Kirillov 3 years ago
committed by GitHub
parent
commit
b251a265fe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      DOCKER/docker-entrypoint.sh

+ 13
- 2
DOCKER/docker-entrypoint.sh View File

@ -1,9 +1,16 @@
#!/bin/bash
set -e
IS_INIT_CMD=
if [ ! -d "$TMHOME/config" ]; then
echo "Running tendermint init to create (default) configuration for docker run."
tendermint init validator
if [ "$1" == "init" ]; then
tendermint "$@"
IS_INIT_CMD=1
else
echo "Running tendermint init to create (default) configuration for docker run."
tendermint init validator
fi
sed -i \
-e "s/^proxy-app\s*=.*/proxy-app = \"$PROXY_APP\"/" \
@ -18,6 +25,10 @@ if [ ! -d "$TMHOME/config" ]; then
jq ".chain_id = \"$CHAIN_ID\" | .consensus_params.block.time_iota_ms = \"500\"" \
"$TMHOME/config/genesis.json" > "$TMHOME/config/genesis.json.new"
mv "$TMHOME/config/genesis.json.new" "$TMHOME/config/genesis.json"
if [ -n "$IS_INIT_CMD" ]; then
exit
fi
fi
exec tendermint "$@"

Loading…
Cancel
Save