Added automatic updates (botnet)

This commit is contained in:
William 2021-03-03 03:28:46 +01:00
parent c6a55f6994
commit d69d5210c3
2 changed files with 19 additions and 2 deletions

View File

@ -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/

View File

@ -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
( 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