rename ageth to ageth-{{ geth_cont_name }}
This fixes issue on hosts where multiple instances run. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
2529f70a94
commit
91e1da9e03
|
@ -2,5 +2,5 @@
|
||||||
- name: Create geth attach wrapper
|
- name: Create geth attach wrapper
|
||||||
template:
|
template:
|
||||||
src: geth-attach-wrapper.sh
|
src: geth-attach-wrapper.sh
|
||||||
dest: /usr/local/bin/ageth
|
dest: '/usr/local/bin/ageth-{{ geth_cont_name }}'
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
GETH_RPC_PORT="{{ geth_rpc_port }}"
|
||||||
|
GETH_CONT_NAME="{{ geth_cont_name }}"
|
||||||
|
|
||||||
if [[ -z "$@" ]]; then
|
if [[ -z "$@" ]]; then
|
||||||
docker exec -it {{ geth_cont_name }} geth attach http://localhost:{{ geth_rpc_port }}
|
docker exec -it "${GETH_CONT_NAME}" geth attach "http://localhost:${GETH_RPC_PORT}"
|
||||||
else
|
else
|
||||||
docker exec {{ geth_cont_name }} geth attach http://localhost:{{ geth_rpc_port }} --exec "$@"
|
docker exec "${GETH_CONT_NAME}" geth attach "http://localhost:${GETH_RPC_PORT}" --exec "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue