This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#user or email the logs get mailed to in case of error / virus (if your mta supports non-local email) | |
ADMIN="user" | |
#Log file used, warning, if you re-use the log file all previous data will be overwritten each time the script is run. | |
LOGFILE="/var/log/transmission/scanlogs/transmission-completed-$TR_TORRENT_NAME.log" | |
#Boolean to choose if logs should be deleted when no error occured or virus was found | |
DELETE_LOG_FILES_ON_OK=false | |
#Boolean to choose if logs should be mailed when no error occured or virus was found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DEST_DIR="/some/other/dir" | |
function linker() { # create simlink to downloaded files, rather than copy to final directory | |
if [ ! -d "$DEST_DIR/$1" ]; then mkdir "$DEST_DIR/$1"; fi | |
cd "$1" | |
for F in *; do | |
if [ -d "$F" ]; then linker "$1/$F"; fi | |
ln -s "$TR_TORRENT_DIR/$1/$F" "$DEST_DIR/$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl -k https://prowl.weks.net/publicapi/add -F apikey=[replace with your growl API key] -F priority=-1 -F application="Transmission" -F description="$TR_TORRENT_NAME completed on $TR_TIME_LOCALTIME" | |
# /bin/curl -k -F apikey=[your Prowl API key here] -F application=Transmission -F event="Download Complete" -F description="$TR_TORRENT_NAME completed on $TR_TIME_LOCALTIME" https://api.prowlapp.com/publicapi/add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NETRC=~/.netrc.transmission | |
TR="transmission-remote -N $NETRC" # command + authentication | |
FILE="lastrunning.list" | |
# accepts arguments -sleep -wake | |
if [ -z "$1" ]; then | |
echo usage: $0 -sleep or -wake | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# blocklist directory | |
BLOCKLISTDIR=/var/lib/transmission-daemon/info/blocklists | |
cd ${BLOCKLISTDIR} | |
if [ $? -eq 0 ]; then | |
if [ -f level1 ]; then | |
rm level1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# script to check for complete torrents in transmission folder, then stop and move them | |
# either hard-code the MOVEDIR variable here… | |
MOVEDIR=/home/mjdescy/media # the folder to move completed downloads to | |
# …or set MOVEDIR using the first command-line argument | |
# MOVEDIR=%1 | |
# use transmission-remote to get torrent list from transmission-remote list | |
# use sed to delete first / last line of output, and remove leading spaces | |
# use cut to get first field from each line |