Package: bittorrent Version: 3.4.2-3sarge0.1 Followup-For: Bug #198848
Here's what I use as a startup script (/etc/init.d/bttrack), plus a config file (/etc/default/bttrack, so it doesn't interfere with the program itself). I haven't been able to do much testing yet, but it picks up options correctly, starts and shuts down, redirects to correct logfile etc. I'm also attaching a setup script I use to prepare my system for these changes (but not running update-rc.d, of course, since as you point out not everyone would want to run a tracker). -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (50, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.11 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages bittorrent depends on: ii python 2.3.5-2 An interactive high-level object-o -- no debconf information
_etc_init.d_bttrack
Description: application/shellscript
# Default configuration for bittorrent tracker, bttrack # Set any bttrack option --foo by defining the variable FOO to the argument # you'd like to pass with the --foo option. See `man bttrack` for a detailed # discussion of the options. # Persistent state file DFILE=/var/lib/bittorrent/bttrack.state # Port defaults to 80, which tends to be inconvenient PORT=6969 # Only allow downloads for .torrent files in this directory #ALLOWED_DIR=/srv/ftp # The following options do not correspond to bttrack options; they influence how # bttrack's init script starts the daemon. # Run under this uid. Must have access to all files and directories involved, # naturally, but should otherwise have minimal privileges to minimize any # security risk. DAEMONUSER=bittorrent # chroot to this directory before starting the daemon. This can also help keep # the daemon secure, but may interact with all sorts of file locations in # unexpected ways. #DAEMONCHROOT=/var/local/lib/bttrack-sandbox # Move to this directory before starting the daemon. This may be useful in # conjunction with DAEMONCHROOT. #DAEMONCHDIR=/var/local/lib/bttrack-sandbox # Run the daemon at this "nice" priority. Setting a positive value here will # dissuade the system from giving all its CPU time to bttrack requests from the # network. DAEMONNICE=5 # Append log output from daemon to this file. Make sure this log is rotated # from time to time so it doesn't fill up your disk. The daemon will of course # need write access to the log file. DAEMONLOGFILE=/var/log/bittorrent/bttrack.log
setup
Description: application/shellscript

