Posts Tagged ‘ torrent ’

Recover ubuntu box from hack, part 10: Setting up transmission BitTorrent client

This went particularly smoothly this time I think. I’m fairly certain there was a lot more confusion last time – especially with where the configuration file is. Anyway, this is how it all went down:

sudo aptitude install transmission-daemon

transmission-daemon is the package which includes the web interface and the CLI client. The web interface is nice but missing some features. The CLI is a bit nicer for automatically added a large number of torrents. Anyway I tested it from my desktop and it’s running, because it gives the error about not being in the allowed IPs list in the settings file.

I remember last time I had a really hard time working out which settings file it used. There seemed to be at least 3. So this time I decided to actually work it out:

lynden@lfs:~$ sudo find / -name settings.json

Ok so there’s two. I decide to work out which one by changing the port of the first one and reloading the service. If I get the same error after, then it’s the other one.

sudo vim /etc/transmission-daemon/settings.json
sudo /etc/init.d/transmission-daemon reload

Test it, and the error changes to a straight cannot find web page. So that’s the correct config file. To be sure I don’t forget, I decide to go and change the other one by putting a comment at the top┬ámentioning┬áthat it’s the other one. So I do that. Then I go back to the first one again to continue setting up, but hey! The warning comment is in this one now! Double check I didn’t open the wrong file, nope. So turns out that the only 2 config files on the system this time are symlinked together. Well that makes things easy.

Anyway, back to the settings: I add the entire subnet to the allowed list, remove log in requirement, set the download directory to be on the RAID share. Now I just need to mount the old system and get the .torrent files and resume information:

sudo mount -o loop /media/share/public/image /media/oldmachine
sudo cp /media/oldmachine/var/lib/transmission-daemon/info/torrents/* /var/lib/transmission-daemon/info/torrents/
sudo chown debian-transmission:debian-transmission /var/lib/transmission-daemon/torrents/*
sudo cp /media/oldmachine/var/lib/transmission-daemon/info/resume/* /var/lib/transmission-daemon/info/resume/
sudo chown debian-transmission:debian-transmission /var/lib/transmission-daemon/resume/*
sudo /etc/init.d/transmission-daemon reload

Done. Check it in my browser again and it’s all working. Awesome. That was quick. One more quick reboot to make sure it comes back by itself – yep. All done. Torrenting set up once more.

%d bloggers like this: