diff --git a/src/installp2pool.sh b/src/installp2pool.sh index f14aff9..02038fc 100644 --- a/src/installp2pool.sh +++ b/src/installp2pool.sh @@ -1,27 +1,39 @@ +GNU nano 5.4 bar #!/bin/bash +# Check for existing install. Skip if necessary +mkdir -p p2pool && cd p2pool +if [ ! -e p2pool-v1.8.tar.gz ] +then apt install wget nano -y -wget -O p2pool.tar.gz https://github.com/SChernykh/p2pool/releases/download/v1.8/p2pool-v1.8-linux-aarch64.tar.gz -mkdir p2pool -tar --one-top-level=p2pool/ --strip-components=1 --keep-newer-files -xvf p2pool.tar.gz -echo 'YourAddress -# Address must begin with 4 -# END to move cursor to the end -# ALT backspace to delete YourAddress -# Tap and hold to paste your actual address -# To save: Ctrl - x - y - enter' > walletaddress.xmr -cat << 'EOF' > startp2pool +wget -O p2pool-v1.8.tar.gz https://github.com/SChernykh/p2pool/releases/download/v1.8/p2pool-v1.8-linux-aarch64.tar.gz +tar --one-top-level=p2pool-v1.8/ --strip-components=1 --keep-newer-files -xvf p2pool-v1.8.tar.gz +else +echo P2Pool is already installed +fi +cd + +# Input user wallet address +echo " + +Tap & Hold to paste your Monero address." +ADDRESS="USER INPUT" +read -p "Wallet Address: " ADDRESS + +# Create start script +cat << EOF > startp2pool #!/bin/bash -./p2pool/p2pool \ +./p2pool/p2pool-v1.8/p2pool \ --host 127.0.0.1 \ ---rpc-port 18081 +--rpc-port 18081 \ --stratum 127.0.0.1:3333 \ ---loglevel 0 \ +--loglevel 1 \ --mini \ --no-randomx \ --wallet \ +$ADDRESS EOF -nano walletaddress.xmr -cat < walletaddress.xmr >> startp2pool + +# Finish up chmod +x startp2pool echo '