To share some files with Transmission daemon and cli tools you must do the following:
* Create the torrent file: transmission-create /path/to/your/very/large/file-or-folder $(curl -sSf https://ngosang.github.io/trackerslist/trackers_best.txt | sed '/^$/d' | sed 's/^/-t /g')
* Add the new torrent to your transmission
* Through the GUI interface, selecting the folder as the destination. In this example it would be /path/to/your/very/large. Finally launch a verify of the data.
* Through the CLI interface: transmission-remote 127.0.0.1:9091 --auth=usr:pwd -a -t /path/to/torrent --no-start-paused --trash-torrent --download-dir /path/to/your/very/large
PS: updated list of trackers can be obtained from https://github.com/ngosang/trackerslist
PSS: If you have doubts about BitTorrent it is best to read the specs, at https://wiki.theory.org/index.php/BitTorrentSpecification
PSSS: You can use this script to automate the deployment
'''
#!/bin/bash
usage() { echo "Usage: $0 [-u <USR>] [-p <PWD>] <FILE-OR-FOLDER" 1>&2; exit 1; }
while getopts ":u:p:" o; do
case "${o}" in
u)
u=${OPTARG}
;;
p)
p=${OPTARG}
;;
*)
usage
;;
esac
done
shift $((OPTIND-1))
FILE="$(readlink -f "$1")"
DIRNAME="$(dirname "$FILE")"
transmission-create "$FILE" $(curl -sSf https://ngosang.github.io/trackerslist/trackers_best.txt | sed '/^$/d' | sed 's/^/-t /g')
torrent="$(ls -1t *torrent | head -1)"
transmission-remote --auth=$u:$p -a "$torrent" --no-start-paused --trash-torrent --download-dir "$DIRNAME"
#transmission-remote --auth=$u:$p -l
echo "Send $torrent to share $1"
'''
Comentarios
Publicar un comentario