Python Bittorrent Tracker Question
April 2, 2004 12:27 AM   Subscribe

ahh, it's nice to finally be a member after a year of lurking..anyway, i figure i would take this opprotunity to ask a question that i've recently run into. I need some help regarding the python bittorrent tracker i recently set up. [more inside]

ok, here's my situation. I just started using the python tracker that comes with the bittorrent 3.2.1 source. the tracker is hosted on a remote unix server, so everytime i want to run the tracker I have to SSH to the host, then type in the usual "python bttrack.py --port 6868 --dfile dstate". i have to keep the session open in order to keep the tracker up. My question is basically how can i keep from needing to run a client window and keep it open everytime I want to run the tracker.
I ran into a problem when my computer crashed the the tracker was down for 5 minutes or so.
I've read a little into shell scripting but not too much. Basically what i'm looking for is some kind of script that can be automatically run on the remote host to start the tracker, and also, if the tracker goes down (server restart or something) then the script runs the command again. I guess the trick would be keeping the session open to keep the tracker alive...
this really seems like it would be a fairly common problem and i'm thinking maybe i'm just missing something obvious, but i've yet to come upon any answer from various bt related sites.
posted by bob sarabia to Computers & Internet (5 answers total)
 
Try man nohup, or configure your shell not to send a SIGHUP on TTY hangup (setopt NOHUP in zsh).

For restarting in case it crashes: while true; do python bttrack.py --port 6868 --dfile dstate; done (in bourne shells and ksh).
posted by fvw at 12:34 AM on April 2, 2004


This doesn't answer the Python question, but I suggest using Azureus. It's kickass.
posted by five fresh fish at 9:37 AM on April 2, 2004


If nohup doesn't work, try screen, if it's okay with your unix shell's administrator. You can run any command or shell with it, then detach the session, which will run in the background even after you've logged out. It's a favorite tool of people who like to idle on IRC with their shell accounts. If it's not on your unix system, get it here.
posted by zsazsa at 10:18 AM on April 2, 2004


I second the screen recommendation. I run all of my bittorrents through it (can't stand the GUI).
posted by togdon at 11:40 AM on April 2, 2004


Response by poster: sweet, i tried "nohup python bttrack.py --port 6868 --dfile dstate &" and it seems to be working great. thanks!
posted by bob sarabia at 1:41 PM on April 2, 2004


« Older FHA Energy Efficient Programs   |   India Pop on iTunes? Newer »
This thread is closed to new comments.