1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Transmission "script-torrent-done" script not running

Discussion in 'Tomato Firmware' started by MrAngles, Oct 8, 2017.

  1. MrAngles

    MrAngles New Member Member

    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:
    "script-torrent-done-enabled": true,
    "script-torrent-done-filename": "/tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.sh",

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

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


    In the Tomato log after a torrent completes I get a message like
    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:
    #!/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
    /bin/sh /tmp/mnt/Torrents/TorrentDownloads/.scripts/runwhendone.shresults 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:
    -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?
     

Share This Page