Help with Transmission (linux)

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
landothedead
Posts: 2
Joined: 24 Oct 2013, 22:49

Help with Transmission (linux)

Post by landothedead »

Hi!
I was hoping someone could give me a hand with a problem I’m having with Transmission calling filebot on torrent completion.
I have transmission running on a raspberry pi as root user with my download folder set to my NAS. Upon torrent done I have it set to the following:

Code: Select all

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "~/Transmission/Processing/test_script.sh”
The shell script “test_script.sh” is in the correct folder with +rx permissions and is set up as follows:

Code: Select all

#!/bin/bash
/usr/share/filebot/bin/filebot.sh -script fn:amc -trust-script --output "/home/pi/stora" --log-file amc.log --action copy --conflict override -non-strict --def artwork=y subtitles=en "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
The script itself runs beautifully when I call it as a standalone (with the “ut_” references replaced by absolute paths to my download folder). I have to run it using sudo so it can write to my NAS, but with Transmission running as root that shouldn’t be an issue, right?
I’ve tried various permutations of “/usr/share/filebot/bin/filebot” with the “.sh” and without, with ~/ and the full path length, and the same for “~/Transmission/Processing/test_script” and none of them have worked. I can get ~/Transmission/Processing/test_script.sh to attempt to run if I put “sudo bash ~/Transmission/Processing/test_script.sh” (I haven’t let it run through as it wouldn’t be able to grab “ut_” references).

I’ve looked through the forum, but haven’t been able to find an answer.

Does anyone have any thoughts?
User avatar
rednoah
The Source
Posts: 22998
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Help with Transmission (linux)

Post by rednoah »

How about you start by checking if it even runs the script?

e.g.

Code: Select all

#!/bin/bash
whoami > "/path/to/filebot-output.txt"
Then you'll see if the file has been created or not. Maybe the script is not ran with root privileges even if transmission is running as root? There could be many issues, just figure it out step by step.

If you manage to run the script, you can start checking if it's running as root:
http://askubuntu.com/questions/30148/ho ... oot-or-not
:idea: Please read the FAQ and How to Request Help.
landothedead
Posts: 2
Joined: 24 Oct 2013, 22:49

Re: Help with Transmission (linux)

Post by landothedead »

Thanks for the reply. I've got it working now. Turned out to be a problem with my writing shell files on my windows laptop and transferring them over. Formatting problem.
Thanks again.
Post Reply