#!/usr/bin/env bash
# Transmission script to move files to post-processing
#################################################################################
# These are inherited from Transmission. #
# Do not declare these. Just use as needed. #
# #
# TR_APP_VERSION #
# TR_TIME_LOCALTIME #
# TR_TORRENT_DIR #
# TR_TORRENT_HASH #
# TR_TORRENT_ID #
# TR_TORRENT_NAME #
# #
#################################################################################
#################################################################################
# CONSTANTS #
# configure directories and filetypes #
#################################################################################
# Use recursive hardlinks (cp -al) only if both Transmission's seed dir and
# the final dir belong to the same filesystem. Set to false to make a
# duplicate copy. Note: true allows you to seed and copy without using up
# twice the storage.
HARDLINKS=true
# The file for logging events from this script
LOGFILE="/data/02-Torrent/01-Torrent/90-Seedbox-6-transmission/transmission-complete.log"
#################################################################################
# SCRIPT CONTROL #
# edit with caution #
#################################################################################
function edate
{
echo "`date '+%Y-%m-%d %H:%M:%S'` $1" >> "$LOGFILE"
}
#!/usr/bin/env bash
# Transmission script to move tiorrent files to post-processing
#################################################################################
# These are inherited from Transmission. #
# Do not declare these. Just use as needed. #
# #
# TR_APP_VERSION #
# TR_TIME_LOCALTIME #
# TR_TORRENT_DIR #
# TR_TORRENT_HASH #
# TR_TORRENT_ID #
# TR_TORRENT_NAME #
# #
#################################################################################
#################################################################################
# CONSTANTS #
# configure directories and filetypes #
#################################################################################
# Use recursive hardlinks (cp -al) only if both Transmission's seed dir and
# the final dir belong to the same filesystem. Set to false to make a
# duplicate copy. Note: true allows you to seed and copy without using up
# twice the storage.
HARDLINKS=true
# The file for logging events from this script
LOGFILE="/data/02-Torrent/01-Torrent/90-Seedbox-6-transmission/transmission-complete.log"
#################################################################################
# SCRIPT CONTROL #
# edit with caution #
#################################################################################
function edate
{
echo "`date '+%Y-%m-%d %H:%M:%S'` $1" >> "$LOGFILE"
}
edate "__________________________NEW TORRENT FINI _______________________"
edate "Version de transmission $TR_APP_VERSION"
edate "Time $TR_TIME_LOCALTIME"
edate "Directory is $TR_TORRENT_DIR"
edate "Torrent Hash is $TR_TORRENT_HASH"
edate "Torrent ID is $TR_TORRENT_ID"
edate "Torrent name is $TR_TORRENT_NAME "
2016-12-13 06:24:37 __________________________NEW TORRENT FINI _______________________
2016-12-13 06:24:38 Version de transmission 2.92
2016-12-13 06:24:38 Time Tue Dec 13 06:24:36 2016
2016-12-13 06:24:38 Directory is /data/02-Torrent/90-Archives
2016-12-13 06:24:39 Torrent Hash is 2d8ca1982b6fd2298deb3d8891ba0dfb7e0f64a9
2016-12-13 06:24:39 Torrent ID is 3372
2016-12-13 06:24:39 Torrent name is ubuntu amd64 full
i see all my *.torrents in /var/lib/transmission-daemon/info/torrents
But with the variables I have. I do not see how I can have the complete path of the .torrent to copy it to another directory ?
2016-12-13 21:00:02 __________________________NEW TORRENT FINI _______________________
2016-12-13 21:00:03 Version de transmission 2.92
2016-12-13 21:00:03 Je sais pas Tue Dec 13 20:59:58 2016
2016-12-13 21:00:03 Directory is /data/02-Torrent/90-Archives_Apollo
2016-12-13 21:00:03 Torrent Hash is 6c4af38bc6004ca80d0216296a6e451387e73993
2016-12-13 21:00:03 Torrent ID is 4829
2016-12-13 21:00:03 Torrent name is debian-8.6.0-amd64-netinst.iso