bittorrenttransmission-daemon

How can I seed in transmiion-daemon from the done folder after a file is done downloading in ./progress?


I have modified the settings.config with the following two attributes:

    "script-torrent-done-enabled": true,
    "script-torrent-done-filename": "/home/ubuntu/dottemplates/scripts/transmission-move-and-seed.sh",

Here is my script:

#!/bin/bash

# Transmission details
TRANSMISSION_HOST="localhost"
TRANSMISSION_PORT="9091"
TRANSMISSION_USER="user"
TRANSMISSION_PASSWORD="pass"

# Torrent hash
TORRENT_HASH=$1

# Directories
PROGRESS_DIR="$HOME/seedbox/progress"
DONE_DIR="$HOME/seedbox/done"

# Move the files to the done folder
mv $PROGRESS_DIR/* "$DONE_DIR/"

# Update Transmission with the new location
transmission-remote "$TRANSMISSION_HOST:$TRANSMISSION_PORT" -n "$TRANSMISSION_USER:$TRANSMISSION_PASSWORD" -t "$TORRENT_HASH" --move "$DONE_DIR"

echo "Torrent $TORRENT_HASH has been moved to $DONE_DIR and will continue seeding."

It continues to seed from the ./progress folder instead of ./done after downloading is complete. After downloading is complete I want to move it to the ./done folder and seed from there.


Solution

  • It was a permission issue. The target directories need to be 777 because transmission-daemon writes as a different user.