[Help]Script gets fired by Transmission, doesn't do anything

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
niciuffo
Posts: 2
Joined: 12 Oct 2014, 15:04

[Help]Script gets fired by Transmission, doesn't do anything

Post by niciuffo »

Hello, I am setting up a Debian home server with Transmission installed on it. The purpose of the server is to download movies and automatically move the completed files in the respective directories. I used this FileBot script to test if it worked:

Image

Calling the script in the /media/storage/torrent/complete directory produces the correct result:

Image

But if I set the script path in the /etc/transmission-daemon/settings.json file, it gets fired but doesn't do anything (Folders don't get moved as they should, nothing happens).

Image

Image

I am probably missing something stupid here. Any ideas?

filebot -script fn:sysinfo returns this:

Code: Select all

FileBot 4.5 (r2600)
JNA Native: 4.0.0
MediaInfo: java.lang.UnsatisfiedLinkError: Unable to load library 'mediainfo': Native library (linux-x86-64/libmediainfo.so) not found in resource path ([file:/usr/share/filebot/FileBot.jar])
7-Zip-JBinding: OK
chromaprint-tools: fpcalc -version failed (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.3.7
JRE: Java(TM) SE Runtime Environment 1.8.0_20 (headless)
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 1 GB Max Memory / 24 MB Used Memory
OS: Linux (amd64)
uname: Linux nas-debian 3.2.0-4-amd64 #1 SMP Debian 3.2.60-1+deb7u3 x86_64 GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 23934
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [Help]Script gets fired by Transmission, doesn't do anyt

Post by rednoah »

I'd check amc.log and see what it says. Should be in ~/.filebot if you're using the .deb package.

Keep in mind that your shell script will be executed by the transmission user which may have different permissions, different, $HOME, different $PATH, etc so I'd make sure to pipe std/err output somewhere just in case "filebot" isn't even called successfully (and thus didn't write any logs).
:idea: Please read the FAQ and How to Request Help.
niciuffo
Posts: 2
Joined: 12 Oct 2014, 15:04

Re: [Help]Script gets fired by Transmission, doesn't do anyt

Post by niciuffo »

rednoah wrote:I'd check amc.log and see what it says. Should be in ~/.filebot if you're using the .deb package.

Keep in mind that your shell script will be executed by the transmission user which may have different permissions, different, $HOME, different $PATH, etc so I'd make sure to pipe std/err output somewhere just in case "filebot" isn't even called successfully (and thus didn't write any logs).
std output is empty, strangely enough. If I launch the script with the transmission user though, it outputs the log correctly. The err output says:

Code: Select all

No such file or directory
Nothing got written in the amc.log.

I don't understand why nothing get written there, but if I start the script with the transmission-user user everything works? Could there be another user which launches the script that isn't transmission-user?

EDIT: Modified /etc/init.d/transmission-daemon , USER=debian-transmission to USER=root . Everything works. I guess that daemon-transmission user doesn't have permissions to execute the script? (I set it at 777). Should I change its owner or something?
gijswijs
Posts: 4
Joined: 03 Jan 2015, 20:36

Re: [Help]Script gets fired by Transmission, doesn't do anyt

Post by gijswijs »

If you are experiencing the same problems on a ReadyNas device, be aware that the start.sh file is located here:
/etc/frontview/addons/bin/TRANSMISSION

Change --chuid nobody:nogroup to whatever user that has execute rights on your script and you're golden.
Post Reply