diff --git a/tac/scripts/init.sh b/tac/scripts/init.sh index 3a96ef30..4b5d94b2 100644 --- a/tac/scripts/init.sh +++ b/tac/scripts/init.sh @@ -32,7 +32,7 @@ fi sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" "$CONFIG_DIR/app.toml" # Serve CometBFT RPC on all interfaces (internal only); default is 127.0.0.1. -sed -i '/^\[rpc\],/^\[/{s|^laddr = .*|laddr = "tcp://0.0.0.0:26657"|}' "$CONFIG_DIR/config.toml" +sed -i '/^\[rpc\]/,/^\[/{s|^laddr = .*|laddr = "tcp://0.0.0.0:26657"|}' "$CONFIG_DIR/config.toml" ct_patch_p2p "$CONFIG_DIR/config.toml" "$IP" "${P2P_PORT:-26656}" ct_merge_seeds "$CONFIG_DIR/config.toml" "$SEEDS" @@ -42,9 +42,9 @@ ct_configure_statesync "$CONFIG_DIR/config.toml" "$STATESYNC_RPC" sed -i -e "s/^indexer *=.*/indexer = \"null\"/" "$CONFIG_DIR/config.toml" -sed -i "/^\[json-rpc\],/^\[/{s|^address = .*|address = \"0.0.0.0:8545\"|}" "$CONFIG_DIR/app.toml" -sed -i "/^\[json-rpc\],/^\[/{s|^ws-address = .*|ws-address = \"0.0.0.0:8546\"|}" "$CONFIG_DIR/app.toml" -sed -i "/^\[json-rpc\],/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml" +sed -i "/^\[json-rpc\]/,/^\[/{s|^address = .*|address = \"0.0.0.0:8545\"|}" "$CONFIG_DIR/app.toml" +sed -i "/^\[json-rpc\]/,/^\[/{s|^ws-address = .*|ws-address = \"0.0.0.0:8546\"|}" "$CONFIG_DIR/app.toml" +sed -i "/^\[json-rpc\]/,/^\[/{s|^api = .*|api = \"$API\"|}" "$CONFIG_DIR/app.toml" ct_seed_priv_validator_state "$HOME_DIR"