daily pastebin goal
96%
SHARE
TWEET

Untitled

a guest Mar 27th, 2018 107 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. torrentid=$1
  3. torrentname=$2
  4. torrentpath=$3
  5.  
  6. x=1
  7. while [ $x -le 100 ]
  8. do
  9. sleep 2
  10. echo "Running $x times" >> ~/script.log
  11. echo "TorrentID: $torrentid" >> ~/script.log
  12. line=$(deluge-console "connect 127.0.0.1:52679; info" $1 | grep "Tracker status")
  13. echo $line >> ~/script.log
  14. case "$line" in
  15. *unregistered*|*Sent*|*End*of*file*|*Bad*Gateway*|torrentleech.org*Error*Connection*Timed*Out*|*Connection*Time*Out*|Error*Connection*Timed*Out*|Tracker status:*torrentleech.org*Error*Connection*Timed*Out*)
  16. deluge-console "connect 127.0.0.1:52679; pause '$torrentid'"
  17. sleep 3
  18. deluge-console "connect 127.0.0.1:52679; resume '$torrentid'"
  19. ;;
  20. *)
  21. echo "Found working torrent: $torrentname $torrentpath $torrentid" >> ~/script.log
  22. exit 1;;
  23. esac
  24. x=$(( $x + 1 ))
  25. done
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Pastebin PRO 'AUTUMN SPECIAL'!
Get 60% OFF Pastebin PRO accounts!
 
Top