Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # Runs a command against the btc node running in docker
- # Usage: ./btcrpc [command]
- command=$@
- if [[ -z "$command" ]]; then
- echo "Usage: ./btcrpc [command]"
- echo "Example: ./btcrpc getmininginfo"
- exit 1
- fi
- if [[ -z "$rpcpassword" ]]; then
- echo "The rpcpassword env variable is not set."
- exit 1
- fi
- docker exec bitcoin /usr/local/bin/bitcoin-cli -rpcuser=$rpcuser -rpcpassword=$rpcpassword $command
Add Comment
Please, Sign In to add comment