Is there a way to fire a script which triggers another application on my centos webserver to upload the just downloaded file?
Let's say file.txt just finished download, then i want a command like this to be fired: "plowup /path/to/file.txt megaupload"
This is the command i type in the terminal to upload stuff with plowshare. other ideas are also welcome. I mainly would like to upload to megaupload and multiupload, but MU is priority.
What it basically comes down to is the question of transmission being able to "say" the path to the newly finished file and using that in a script to run the above command.
Again, i'm sorry if this post is not allowed. And if it's not, i would like to know why.
fire upload script right after download finishes
Re: fire upload script right after download finishes
first you have to enable the script-done feature in settings.json:
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/path/to/your/uploadscript",
then make sure script is executable "chmod 755 uploadscript"
the actual uploadscript might look someting like this:
just keep in mind the torrent can either be a file or directory. also the file /tmp/script.log will contain a record of the output and can be useful for troubleshooting.
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/path/to/your/uploadscript",
then make sure script is executable "chmod 755 uploadscript"
the actual uploadscript might look someting like this:
Code: Select all
#!/bin/bash
plowup "$TR_TORRENT_DIR/$TR_TORRENT_NAME" megaupload >>/tmp/script.log 2>&1
Re: fire upload script right after download finishes
ok that's awesome!
now i just need to find a way to output the urls to a txt file! Will post results for other people who are interested 


Re: fire upload script right after download finishes
ok i tested and this works amazingly well! I even managed to get the url and filename outputted to a txt file. However, transmission freezes up once the script starts and it stays like that until the script is done. How can i fix this?
Re: fire upload script right after download finishes
the freeze is fixed in the nightly builds. https://trac.transmissionbt.com/ticket/3764
Re: fire upload script right after download finishes
Ortix, if the script normally takes a long time to finish, try doing this:
and see if it makes a difference.
Code: Select all
#!/bin/bash
{
<your script>
} &
Re: fire upload script right after download finishes
yes i did! and it worked great 
