Transmission not executing script after torrent completes

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Sloppsta
Posts: 1
Joined: Sun Nov 10, 2019 10:20 pm

Transmission not executing script after torrent completes

Post by Sloppsta »

Hello, I am having trouble getting this unrar script to work. I have installed unrar and bash inside the transmission jail, stuffes the script in with settings.json, and updated the settings. What am I doing wrong? As far as I can tell, the script is never being called. Everything is set to the right ownership and executable to the best of my knowledge. This is on FreeNas using transmission 2.94_3.

Script

Code: Select all

#!/bin/bash
#A simple script to extract a rar file inside a directory downloaded by Transmission.
#It uses environment variables passed by the transmission client to find and extract any rar files from a downloaded torrent into the folder they were found in.

find /$TR_TORRENT_DIR/$TR_TORRENT_NAME -name "*.rar*" -execdir unrar e -o- "{}"  \;
settings.json

Code: Select all

{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 64,
    "dht-enabled": false,
    "download-dir": "/usr/local/etc/transmission/home/Downloads",
    "download-queue-enabled": true,
    "download-queue-size": 10,
    "encryption": 1,
    "idle-seeding-limit": 20160,
    "idle-seeding-limit-enabled": true,
    "incomplete-dir": "//Downloads",
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "message-level": 3,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 50,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": false,
    "pidfile": "/var/run/transmission/daemon.pid",
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "prefetch-enabled": true,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-host-whitelist": "",
    "rpc-host-whitelist-enabled": true,
    "rpc-password": "{2d7920b16177a1db7595b837eef1a39770134f05fYykUhXK",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "",
    "rpc-whitelist": "127.0.*.*",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": true,
    "script-torrent-done-filename": "/bin/sh /usr/local/etc/transmission/home/unrar.sh",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 18,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true,
    "watch-dir": "/TORRENTS",
    "watch-dir-enabled": true
}
Log

Code: Select all

Nov 10 14:15:17 transmission transmission-daemon[17607]: TEST [LAZY] checking just-completed piece 356 (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/torrent.c:3318)
Nov 10 14:15:20 transmission transmission-daemon[17607]: TEST [LAZY] checking just-completed piece 295 (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/torrent.c:3318)
Nov 10 14:15:23 transmission transmission-daemon[17607]: TEST [LAZY] checking just-completed piece 236 (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/torrent.c:3318)
Nov 10 14:15:25 transmission transmission-daemon[17607]: TEST [LAZY] checking just-completed piece 585 (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/torrent.c:3318)
Nov 10 14:15:26 transmission transmission-daemon[17607]: TEST [LAZY] checking just-completed piece 390 (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/torrent.c:3318)
Nov 10 14:15:27 transmission transmission-daemon[17607]: TEST Announcing to tracker (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/announcer.c:1554)
Nov 10 14:15:27 transmission transmission-daemon[17607]: TEST Announce response contained scrape info; rescheduling next scrape to 1800 seconds from now. (/wrkdirs/usr/ports/net-p2p/transmission-daemon/work/transmission-2.94/libtransmission/announcer.c:1152)
Post Reply