2021-03-19 11:52:00 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-12-09 12:05:00 +00:00
|
|
|
# vim: set ft=sh:
|
2021-03-19 11:52:00 +00:00
|
|
|
GETH_CONT_NAME="{{ geth_cont_name }}"
|
|
|
|
GETH_RPC_PORT="{{ geth_rpc_port }}"
|
|
|
|
GETH_RPC_ADDR="localhost"
|
|
|
|
GETH_RPC_URL="http://${GETH_RPC_ADDR}:${GETH_RPC_PORT}"
|
|
|
|
|
|
|
|
if [[ -z "$@" ]]; then
|
2022-12-09 12:05:00 +00:00
|
|
|
exec docker exec -it "${GETH_CONT_NAME}" geth attach "${GETH_RPC_URL}"
|
2021-03-19 11:52:00 +00:00
|
|
|
else
|
2022-12-09 12:05:00 +00:00
|
|
|
exec docker exec "${GETH_CONT_NAME}" geth attach --exec "$@" "${GETH_RPC_URL}"
|
2021-03-19 11:52:00 +00:00
|
|
|
fi
|