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 comments total)
man nohup, or configure your shell not to send a SIGHUP on TTY hangup (setopt NOHUPin 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