Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- mktorrent -p -l 16 -a udp://tracker.coppersurfer.tk:6969/announce -a udp://tracker.openbittorrent.com:80/announce -a udp://tracker.leechers-paradise.org:6969/announce -o /srv/deluge/torrent/$1.torrent /srv/deluge/storage/$1
- # Now lets send the torrent in a mail
- cat << end > /srv/deluge/mail.mail
- To:EMAIL@EXAMPLE.com
- Cc:EMAIL@EXAMPLE.com
- From:EMAIL@EXAMPLE.com
- Subject:Autogenerated torrent
- MIME-Version: 1.0 (mime-contruct 1.9)
- Content-Type: multipart/mixed;
- boundary="MIMEBOUNDARY"
- --MIMEBOUNDARY
- Content-type: text/plain
- Torrent attached
- --MIMEBOUNDARY
- Content-Type: application/x-bittorrent;
- Content-Disposition: attachment;
- filename="$1.torrent"
- Content-Transfer-Encoding: base64
- end
- cat /srv/deluge/torrent/$1.torrent | openssl base64 >> /srv/deluge/mail.mail
- echo -e '\n\n--MIMEBOUNDARY--' >> /srv/deluge/mail.mail
- cat /root/mail.mail | msmtp --read-recipients
- # Move the file to the downloads directory of deluge, and copy the torrent to the auto add folder setup in deluge
- mv /srv/deluge/storage/$1 /srv/deluge/downloads/$1
- cp /srv/deluge/torrent/$1.torrent /srv/deluge/autoAdd/$1.torrent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement