Advertisement
miraip0ts

xmrig-proxy restart script

May 30th, 2023
3,080
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.26 KB | None | 0 0
  1. #!/bin/bash
  2. #nohup sh xmrig.sh > /dev/null 2>&1 &
  3.  
  4. port=8080
  5. host="0.0.0.0"
  6.  
  7. check_port()
  8. {  
  9.     if ! nc ${host} ${port} < /dev/null
  10.     then
  11.      screen ./xmrig-proxy > /dev/null 2>&1 &  
  12.     fi
  13. }
  14.  
  15. while true
  16. do
  17.    check_port
  18.    sleep 10
  19. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement