Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Made by Taylor Christian Newsome | SleepTheGod | ClumsyLulz
- # Set script variables
- MINER_VERSION="0.24.1"
- MINER_DOWNLOAD_URL="https://github.com/bitcoin-abc/bitcoin-abc/releases/download/v$MINER_VERSION/bitcoin-abc-$MINER_VERSION-x86_64-linux-gnu.tar.gz"
- MINER_DIR="/opt/bitcoin-miner"
- BTC_CORE_VERSION="24.0.1"
- BTC_CORE_DOWNLOAD_URL="https://bitcoincore.org/bin/linux/bitcoin-$BTC_CORE_VERSION-x86_64-linux-gnu.tar.gz"
- BTC_CORE_DIR="/opt/bitcoind"
- # Check for required tools
- if [[ ! -x "$(command -v wget)" ]]; then
- echo "Error: wget is not installed. Please install wget before running this script."
- exit 1
- fi
- # Install Bitcoin Miner
- if [[ ! -d "$MINER_DIR" ]]; then
- # Download and extract Bitcoin Miner
- echo "Downloading Bitcoin Miner..."
- wget -O - "$MINER_DOWNLOAD_URL" | tar -xzvf - -C "$MINER_DIR"
- if [[ $? -ne 0 ]]; then
- echo "Error: Failed to download and extract Bitcoin Miner. Please check your internet connection and try again."
- exit 1
- fi
- fi
- # Install Bitcoin Core
- if [[ ! -d "$BTC_CORE_DIR" ]]; then
- # Download and extract Bitcoin Core
- echo "Downloading Bitcoin Core..."
- wget -O - "$BTC_CORE_DOWNLOAD_URL" | tar -xzvf - -C "$BTC_CORE_DIR"
- if [[ $? -ne 0 ]]; then
- echo "Error: Failed to download and extract Bitcoin Core. Please check your internet connection and try again."
- exit 1
- fi
- fi
- # Auto-configure Bitcoin Core
- echo "Auto-configuring Bitcoin Core..."
- "$BTC_CORE_DIR/bitcoind" -datadir="$BTC_CORE_DIR" -conf="$BTC_CORE_DIR/bitcoin.conf" &> /dev/null &
- # Start Bitcoin Miner
- echo "Starting Bitcoin Miner..."
- "$MINER_DIR/bitcoin-abc" -server -gen -stratumpool=stratum.bitcoin.cz:2800
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement