attach.sh: fix position of --exec argument
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
98838533df
commit
f8f2e33772
|
@ -1,12 +1,12 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# vim: set ft=sh:
|
||||||
GETH_CONT_NAME="{{ geth_cont_name }}"
|
GETH_CONT_NAME="{{ geth_cont_name }}"
|
||||||
GETH_RPC_PORT="{{ geth_rpc_port }}"
|
GETH_RPC_PORT="{{ geth_rpc_port }}"
|
||||||
GETH_RPC_ADDR="localhost"
|
GETH_RPC_ADDR="localhost"
|
||||||
GETH_RPC_URL="http://${GETH_RPC_ADDR}:${GETH_RPC_PORT}"
|
GETH_RPC_URL="http://${GETH_RPC_ADDR}:${GETH_RPC_PORT}"
|
||||||
|
|
||||||
if [[ -z "$@" ]]; then
|
if [[ -z "$@" ]]; then
|
||||||
docker exec -it "${GETH_CONT_NAME}" geth attach "${GETH_RPC_URL}"
|
exec docker exec -it "${GETH_CONT_NAME}" geth attach "${GETH_RPC_URL}"
|
||||||
else
|
else
|
||||||
docker exec "${GETH_CONT_NAME}" geth attach "${GETH_RPC_URL}" --exec "$@"
|
exec docker exec "${GETH_CONT_NAME}" geth attach --exec "$@" "${GETH_RPC_URL}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue