Transmission - Ubuntu - Filebot not running from script
Posted: 11 Oct 2015, 02:00
I have googled and worked on this code for so long now and still cannot get it to work. Hoping someone has some insight.
I am using ubuntu and have a script to run when a torrent is complete in transmission. Transmission runs under my user (dom) and has the same permissions as the script. I've done a whoami > log in the script and it comes up as dom so 1. I know the script is being run, and 2. it's running under "dom".
If I run the script manually, it calls filebot just fine and sorts my movies.
Here is the code:
My coding isn't the best, but like I said, the script runs fine manually. The log files I have setup do show "SCANNED MOVIE:" with the title, so I know the if statement is run.
my settings.json file is owned by dom, as well as transmission, all the folders called in the script. Filebot is also owned by dom.
I've been trying to figure this out for months now, so any info would be much appreciated!
PS. I just noticed that my amc.log file shows "/.filebot" when the script runs from transmission
Thanks
-Dom
I am using ubuntu and have a script to run when a torrent is complete in transmission. Transmission runs under my user (dom) and has the same permissions as the script. I've done a whoami > log in the script and it comes up as dom so 1. I know the script is being run, and 2. it's running under "dom".
If I run the script manually, it calls filebot just fine and sorts my movies.
Here is the code:
Code: Select all
#!/bin/bash
if test "$TR_TORRENT_DIR" = '/home/dom/Media/Unsorted/Movies'; then
/usr/bin/filebot -script fn:amc --output "/home/dom/Media/Movies" --log-file /home/dom/.filebot/logs/amc.log --action move --conflict override -non-strict "/home/dom/Media/Unsorted/Movies" --def excludeList=/home/dom/Media/Movies/amc.txt subtitles=en,es "movieFormat=/home/dom/Media/Movies/{n.space('.')}.{y}.{vc}.{vf}" clean=y plex=127.0.0.1:xxxxxxxxx pushbullet=xxxxxxxxxxxxxxxxxxxxxxx >>/home/dom/Logs/trans-error.log 2>&1
echo "[`date '+%Y-%m-%d %H:%M:%S'`] SCANNED MOVIE: $TR_TORRENT_NAME" >> /home/dom/Logs/trans-check.log
exit
else
echo "[`date '+%Y-%m-%d %H:%M:%S'`] NOT SCANNED - Download Directory: $TR_TORRENT_DIR" >> /home/dom/Logs/trans-check.log
exit
fi
my settings.json file is owned by dom, as well as transmission, all the folders called in the script. Filebot is also owned by dom.
I've been trying to figure this out for months now, so any info would be much appreciated!
PS. I just noticed that my amc.log file shows "/.filebot" when the script runs from transmission
Thanks
-Dom