You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
856 B

  1. #!/bin/bash
  2. set -e
  3. if [ ! -d "$TMHOME/config" ]; then
  4. echo "Running tendermint init to create (default) configuration for docker run."
  5. tendermint init validator
  6. sed -i \
  7. -e "s/^proxy-app\s*=.*/proxy-app = \"$PROXY_APP\"/" \
  8. -e "s/^moniker\s*=.*/moniker = \"$MONIKER\"/" \
  9. -e 's/^addr-book-strict\s*=.*/addr-book-strict = false/' \
  10. -e 's/^timeout-commit\s*=.*/timeout-commit = "500ms"/' \
  11. -e 's/^index-all-tags\s*=.*/index-all-tags = true/' \
  12. -e 's,^laddr = "tcp://127.0.0.1:26657",laddr = "tcp://0.0.0.0:26657",' \
  13. -e 's/^prometheus\s*=.*/prometheus = true/' \
  14. "$TMHOME/config/config.toml"
  15. jq ".chain_id = \"$CHAIN_ID\" | .consensus_params.block.time_iota_ms = \"500\"" \
  16. "$TMHOME/config/genesis.json" > "$TMHOME/config/genesis.json.new"
  17. mv "$TMHOME/config/genesis.json.new" "$TMHOME/config/genesis.json"
  18. fi
  19. exec tendermint "$@"