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