Script / Email when complete

Discussion of the Web Interface for Transmission, formerly known as Clutch. This applies to all version of Transmission
Post Reply
bobbygood
Posts: 4
Joined: Wed Feb 11, 2015 11:51 pm

Script / Email when complete

Post by bobbygood »

Hello,

does someone can explain me step by step for a noob how can i create script and how t configure my Ubuntu server to receive an email when a file is completed please ?
I've tried many things but it doesn't work.

Thank you
bobbygood
Posts: 4
Joined: Wed Feb 11, 2015 11:51 pm

Re: Script / Email when complete

Post by bobbygood »

Hello, can someone tell me if this process is right please ?

I have created a file on my computer called complete.sh with inside :

#!/bin/bash

###
### Script to send an email when a torrent finishes
###

EMAIL=emailATmailDOTcom # Email address

printf "The torrent $TR_TORRENT_NAME has been downloaded successfully at $TR_TIME_LOCATIME\nIl is available in $TR_TORRENT_DIR" | mail -s "Transmission finished downloading : $TR_TORRENT_NAME" $EMAIL

(of course emailATmailDOTcom have been changed with my real mail)

I uploaded this file by FTP on my Ubuntu Server in /etc/transmission-daemon
In my Terminal i wrote :
cd /etc/transmission-daemon
chmod +x complete.sh

then i've changed settings.json
service transmission-daemon stop
nano /etc/transmission-daemon/settings.json
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/etc/transmission-daemon/complete.sh",
service transmission-daemon start

Did i forget someone ? I don't received any mail...
Thank you
Ziemowit
Posts: 3
Joined: Sat Feb 21, 2015 7:40 am

Re: Script / Email when complete

Post by Ziemowit »

U might want to have a look into this. http://www.filebot.net/forums/viewtopic.php?t=215
I recently set this up on my nas and use push notifications for that purpose.
I had quite some trouble with all of this since I am new to unix/Linux. But I did the same to activate the post process script, so that part should be alright. U could check if transmission is calling the script in the transmisison log though.
cripes
Posts: 2
Joined: Fri Aug 05, 2011 12:24 pm

Re: Script / Email when complete

Post by cripes »

bobbygood wrote:Hello,

does someone can explain me step by step for a noob how can i create script and how t configure my Ubuntu server to receive an email when a file is completed please ?
I've tried many things but it doesn't work.

Thank you
No need to reinvent the wheel :/

Use the email script /usr/share/doc/transmission-daemon/examples/send-email-when-torrent-done.sh

Works for me on Ubuntu server 14.04.
Post Reply