Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- logger -t Transmission-Renamer "Starting at $(date '+%r')"
- tvshow=$(echo $TR_TORRENT_DIR | cut -d/ -f4)
- if [ -n "$tvshow" ]; then
- cd "$TR_TORRENT_DIR"
- # tvn is a custom BASH script that processes a .series_id file then calls tvnamer with --series-id arg
- /root/bin/tvn "$TR_TORRENT_NAME" | logger -t Transmission-Renamer
- showname=$(logread | grep "Transmission-Renamer" | grep "New filename:" | tail -n 1 | awk -F" New filename: " '{ print $2 }' | sed 's/\..*//')
- if [ "$showname" != "" ]; then
- /root/bin/sendTweet "Download completed at $(date '+%r') of $showname"
- else
- /root/bin/sendTweet "Download completed at $(date '+%r') of $TR_TORRENT_NAME"
- fi
- else
- logger -t 'Transmission-Renamer' 'Not a TV Show'
- /root/bin/sendTweet "Download completed at $(date '+%r') of $TR_TORRENT_NAME"
- fi
- logger -t Transmission-Renamer "Stopping at $(date '+%r')"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement