Advertisement
Tweek-

sendtvtorrents.sh

Oct 29th, 2015
1,136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #!/bin/bash
  2. login="seedbox username"
  3. pass="seedbox password"
  4. host="SERVERHOSTNAME.feralhosting.com"
  5. remote_dir="/media/sdr1/home/FERALUSERNAME/private/deluge/watch/tv/" #mark watch folders inside Deluge client
  6. local_dir="/volume1/Media/incomplete/torrents/tv/" #synology incomplete tv path
  7.  
  8.  
  9. trap "rm -f /tmp/sendtvtorrent.lock" SIGINT SIGTERM
  10. if [ -e /tmp/sendtvtorrent.lock ]
  11. then
  12. echo "SendTVtorrent is running already."
  13. exit 1
  14. else
  15. touch /tmp/sendtvtorrent.lock
  16. lftp -p 22 -u $login,$pass sftp://$host << EOF
  17. mirror -R --exclude @eaDir/ -v --Remove-source-file -c -P5 --log=sendtvtorrents.log $local_dir $remote_dir
  18. quit
  19. EOF
  20. rm -f /tmp/sendtvtorrent.lock
  21. trap - SIGINT SIGTERM
  22. exit 0
  23. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement