Guest User

Untitled

a guest
Oct 27th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # Runs a command against the btc node running in docker
  3. # Usage: ./btcrpc [command]
  4. command=$@
  5. if [[ -z "$command" ]]; then
  6. echo "Usage: ./btcrpc [command]"
  7. echo "Example: ./btcrpc getmininginfo"
  8. exit 1
  9. fi
  10. if [[ -z "$rpcpassword" ]]; then
  11. echo "The rpcpassword env variable is not set."
  12. exit 1
  13. fi
  14. docker exec bitcoin /usr/local/bin/bitcoin-cli -rpcuser=$rpcuser -rpcpassword=$rpcpassword $command
Add Comment
Please, Sign In to add comment