2019-04-26 12:11:23 +00:00
|
|
|
#!/usr/bin/env bash
|
2020-01-29 12:10:41 +00:00
|
|
|
|
|
|
|
GETH_RPC_PORT="{{ geth_rpc_port }}"
|
|
|
|
GETH_CONT_NAME="{{ geth_cont_name }}"
|
|
|
|
|
2019-04-26 12:11:23 +00:00
|
|
|
if [[ -z "$@" ]]; then
|
2020-01-29 12:10:41 +00:00
|
|
|
docker exec -it "${GETH_CONT_NAME}" geth attach "http://localhost:${GETH_RPC_PORT}"
|
2019-04-26 12:11:23 +00:00
|
|
|
else
|
2020-01-29 12:10:41 +00:00
|
|
|
docker exec "${GETH_CONT_NAME}" geth attach "http://localhost:${GETH_RPC_PORT}" --exec "$@"
|
2019-04-26 12:11:23 +00:00
|
|
|
fi
|