"script-torrent-done" script not running

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
MrAngles
Posts: 1
Joined: Sat Oct 07, 2017 9:25 pm

"script-torrent-done" script not running

Post by MrAngles »

There are tons of these all over this forum and others but I can't seem to solve my problem. Most other threads about this seem to be solved by chmod commands or are left unresolved for whatever reason, so hopefully I'm not missing something obvious and wasting time, but I can't get my script to run no matter what I do.

I'm running Shibby's TomatoUSB mod (1.28.0000 MIPSR2-138 K26 USB AIO) on a Netgear wnr3500Lv2 router, with the built-in Transmission client (v2.92) enabled.

I've tried various Transmission config values including:

Code: Select all

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.sh",
or

Code: Select all

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/bin/sh /tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.sh",
or

Code: Select all

"script-torrent-done-enabled": true,
"script-torrent-done-filename": "'/bin/sh' '/tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.sh'",
In the Tomato log after a torrent completes I get a message like

Code: Select all

Calling script "/bin/sh /tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.sh" (torrent.c:2118)
Which seems to indicate that it's being called properly as far as I can tell.

I've tried several scripts, right now I'm just using this:

Code: Select all

#!/bin/sh
echo "$TR_TORRENT_NAME is completed" >> /tmp/mnt/Torrents/TorrentDownloads/.scripts/test.log 
Running the script manually via ssh with the root user using the command

Code: Select all

/bin/sh /tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.sh
results in a " is completed" line being added to test.log so the script itself doesn't seem to be an issue.

When I use a "ls -l" to check the permissions for the script and test.log, the output is:

Code: Select all

-rwxrwxrwx    1 root     root           103 Oct  6 22:20 runwhendone.sh
-rwxrwxrwx    1 root     root            56 Oct  7 16:45 test.log
which I think is indicating that the files being used have the appropriate level of permissions for all users.

What have I forgotten?
Post Reply