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.

21 lines
748 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 &&
  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. sed -i \
  16. -e "s/^\s*\"chain_id\":.*/ \"chain_id\": \"$CHAIN_ID\",/" \
  17. "$TMHOME/config/genesis.json"
  18. fi
  19. exec tendermint "$@"