#!/bin/bash # Set up a Decred node. # # Debian or Ubuntu AMD64 (x86_64) server/VPS recommended. # # To use run: # curl -L https://node.dcr.pw | bash # # Check it's running with: # systemctl status dcrd # Or run decred.sh to view the output of dcrd.log in real-time. # Get permissions. sudo -s # Set CPU architecture, Decred version, binaries archive name, logo. arch=$(uname -m) if [ "$arch" == 'x86_64' ]; then a=amd64 fi if [ "$arch" == 'aarch64' ]; then a=arm64 fi if [ "$arch" == 'armv7l' ]; then a=arm fi v=v2.0.1 b=decred-linux-${a}-${v}.tar.gz l=$(exec base64 -d <<<"H4sIAAAAAAAAA52TP2/DIBDFd3+K2xiKL21HqLKkY4cq6mZ1qAAlkVCoDEn98Rv+GWxHbdM3GQS/ e353NDAKs8YNWoQwU/sHNRWcM+HFM4hoWWTKflAHz0r0SsLRSAXWfbiTndV/byZLpJHPSOaLgh8G KQq/Ayl6CedHvMeH+W9dhXtcwucgMKy1SXhe4L9qAUfKWcTPYggZDcOQ6R3snfu0bLWSIR40/e5H OBKWNU0niEXv/3R+6WgQp5Qk1eYxJo8Z3sL2dITk2+7BGTgf1FfoBWqzm8CRc09fTl1S6u3ovIXX XlkLT5u37csa7i4fa19BDQe3cE65F71ORm4iu2R+UywRXseMqbVpWPy0j7VvfEQkwKczQrVJ8mjN 6xZFM5xMh0qk85pifTjBfTTVHeSRrxnOHlw5H+7kGtmPwMUbQiT0yo1kSArSfAMX1JvnjgQAAA==" | gunzip) # Show logo printf "$l \n\n" # Download Decred binaries archive. curl -L -O https://github.com/decred/decred-binaries/releases/download/${v}/${b} # Extract Decred binaries. tar -xf ${b} --strip-components 1 -C /usr/local/bin/ # Stop existing dcrd instance. systemctl status dcrd.service >/dev/null && systemctl stop dcrd.service # Create dcrd service. cat > /etc/systemd/system/dcrd.service < /usr/local/bin/decred.sh <