我修改了settings.config,添加了以下两个属性:
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/home/ubuntu/dottemplates/scripts/transmission-move-and-seed.sh",
这是我的脚本:
#!/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."
下载完成后,它继续从 ./progress 文件夹而不是 ./done 播种。下载完成后,我想将其移动到 ./done 文件夹并从那里种子。
这是一个权限问题。目标目录需要是 777,因为 Transmission-daemon 以不同的用户身份写入。