From d69d5210c3003bec47ef49e51b02f56321a1d019 Mon Sep 17 00:00:00 2001 From: William Date: Wed, 3 Mar 2021 03:28:46 +0100 Subject: [PATCH] Added automatic updates (botnet) --- install.sh | 2 +- start-miner.sh | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 52774bf..92e988c 100644 --- a/install.sh +++ b/install.sh @@ -8,7 +8,7 @@ fi # install dependencies apt update -apt install msr-tools numactl hwloc openssl libmicrohttpd12 git -y +apt install msr-tools numactl hwloc openssl libmicrohttpd12 git curl wget -y # clone repository cd /opt/ diff --git a/start-miner.sh b/start-miner.sh index efe2c19..6cbf30c 100644 --- a/start-miner.sh +++ b/start-miner.sh @@ -15,4 +15,21 @@ source 'scripts/randomx_booster.sh' source 'scripts/huge_pages.sh' # start xmr-stak-rx -cd 'xmr-stak-rx' && ./xmr-stak-rx \ No newline at end of file +( cd 'xmr-stak-rx' && ./xmr-stak-rx ) & + +# check for updates forever +LOCAL=$(git rev-parse HEAD) +while [ 1 ] +do + if [ $LOCAL != $(git ls-remote https://git.willy.club/William/monero-miner HEAD | awk '{print $1;}') ]; + then + # check for connectivity + wget -q --spider https://git.willy.club + if [ $? -eq 0 ]; then + curl -sSL https://git.willy.club/William/monero-miner/raw/branch/master/install.sh | bash + systemctl restart minero-miner.service + break + fi + fi + sleep 5 +done \ No newline at end of file