Someone asked me to give a short list of what trans_watchdog is doing.
I never really took the time and just started writing and learning in the progress as I am just recently introduced into bash-scripting.
- Check if transmission is running…
- Check every minute if a torrent-file is placed in the watchdog
- Sanitize the name of the torrent-file (replace diacritical character with their non-diacritical counterpart http://en.wikipedia.org/wiki/Diacritic) and remove special characters.
- Add that torrent if it the maximum downloadable setting has not been reached (MAX_SIMULTANEOUS)
- Every <INTERVAL> minutes (5) it will continue the script for more work (rest of this list)
- It will stop if "unrar" is currently busy (to alleviate the worldbook and keep things quick and nasty)
- If transmission is not running it will start transmission if KEEP_TRANSMISSION_RUNNING is set and then stop the script
- If transmission is running but not responding it wil restart transmission (if KEEP_TRANSMISSION_RUNNING is set) and stop the script
- If SUPERSOCIAL is set it will check if samba is busy (using top)
- If $THROTTLE_DONTKILL is set as well, it will throttle transmission, otherwise it will stop it.
- It will check a hourly schedule based on 2 arrays. One for weekdays and one for weekend (you can customize which days are weekend) and throttle transmission accordingly.
- Every 3 hours it will turn transmission-daemon off if it's not handling torrents and KEEP_TRANSMISSION_RUNNING is set
- If a torrent is downloaded it will pause the torrent, move it to the "finished dir", put a symbolic link instead of the torrent and unpause it.
- If the torrent is rar-file or dir with rars, it will unrar its contents.
- If unrarring is successfull and KEEPRAR is set to off it will delete the original file and remove the torrent from the list
- It will mail you when the torrent is done
- It will remove a torrent if its lifetime has exceeded a certain age MAX_SEEDTIME
- It will remove a torrent if MAX_RATIO has been reached.
- Getting rid of symbolic links if they are not used by transmission-daemon
It's doing some more.. Especially checking if everything is as it should be…
After a file has been downloaded I have a seperate script (running every hour) which automatically places AVI's and DVD's to a special directory where I can view them from my xbox (XBMC). These 2 scripts (mkdvd & mvmovie) do this after an extensive cleanup of the name also using a slightly modified IMDB-script because most torrents are infested with all kinds of ugly tags.
http://wd.mirmana.com/mvmovie
http://wd.mirmana.com/imdb
http://wd.mirmana.com/mkdvd
Please use a seperate thread if you have problems installing the script, but do come here if you have notes/problems about using it….




















