transmission-remote and blocklist-update

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

transmission-remote and blocklist-update

Post by TheBigYahi »

I'm running transmission-daemon and I'm trying to set up a cron job to automatically update the blocklist. When I run the job:

Code: Select all

@midnight /usr/local/bin/transmission-remote --blocklist-update
I see that the blocklist file gets updated as expected. The only thing that I'm wondering is if, after the update, do I need to restart the daemon? The wiki seems to imply that I do, but I'm hoping I don't so I can avoid running unnecessary verifications of the data I'm downloading.
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

Re: transmission-remote and blocklist-update

Post by TheBigYahi »

Data verification happens on all active downloads when the daemon restarts. Is that not how it's supposed to work?
pecet
Posts: 3
Joined: Fri Mar 26, 2010 9:52 am

Re: transmission-remote and blocklist-update

Post by pecet »

I think so, i'm using 1.92 and torrents are verified everytime i kill transmission-daemon, solution is to pause torrents before killing daemon
Longinus00
Posts: 137
Joined: Fri Aug 21, 2009 5:46 am

Re: transmission-remote and blocklist-update

Post by Longinus00 »

You should only need to reverify if you are using sigkill when stopping the daemon.
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

Re: transmission-remote and blocklist-update

Post by TheBigYahi »

The restart command I'm using comes from the init.d script and is as follows:

Code: Select all

start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile $PIDFILE --name $NAME
Is there a better way to implement this?
Longinus00
Posts: 137
Joined: Fri Aug 21, 2009 5:46 am

Re: transmission-remote and blocklist-update

Post by Longinus00 »

You could try increasing the TERM timeout and removing the KILL. But you'll have to check if it returns an error status of 2 if it's unable to stop the daemon.

In the future, reloading blocklists hopefully won't require any fancy steps. http://trac.transmissionbt.com/ticket/2718
TheBigYahi
Posts: 13
Joined: Fri Jan 29, 2010 3:16 pm

Re: transmission-remote and blocklist-update

Post by TheBigYahi »

So I played around with the start-stop-daemon but couldn't get it to work without KILL. I decided to write a script to pause all, restart Transmission, resume all. I then run this as a cron job.

There is one issue that came up, torrents that have finished seeding will resume with the ...-tall -s command. Is there a way that I can have it exclude torrents that have completed seeding?

Code: Select all

#! /bin/sh

#       This script will update Transmission blocklist, pause all Transmission transfers, restart the daemon, then restart all transfers.

username='username'
password='password'

/usr/local/bin/transmission-remote --auth $username:$password --blocklist-update
/usr/local/bin/transmission-remote --auth $username:$password -tall -S
/etc/init.d/transmission-daemon restart
sleep 5s
/usr/local/bin/transmission-remote --auth $username:$password -tall -s

Post Reply