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