Advertisement
gvm92

oto aff

Apr 9th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. pathFF='/usr/lib/firefox/firefox'
  4. maxFFRuntime=15
  5.  
  6. if pgrep -f $pathFF >/dev/null; then exit 1; fi
  7. while true; do
  8. startTime=$(date +%s)
  9. pidFF=0
  10. while (( ($(date +%s) - startTime) < (maxFFRuntime * 60) )); do
  11. if (( "$pidFF" == "0" )) || ! kill -0 $pidFF >/dev/null 2>&1; then
  12. $pathFF 'http://www.otohits.net/account/login' >/dev/null 2>&1 &
  13. pidFF=$!
  14. fi
  15. sleep 5
  16. done
  17. if kill -0 $pidFF >/dev/null 2>&1; then
  18. disown $pidFF
  19. kill $pidFF >/dev/null 2>&1
  20. sleep 5
  21. if kill -0 $pidFF >/dev/null 2>&1; then kill -9 $pidFF >/dev/null 2>&1; fi
  22. fi
  23. sleep 2
  24. done
  25. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement