[arch-commits] Commit in bittorrent/trunk (bttrack bttrack.conf)
Paul Mattal
paul at archlinux.org
Sun Mar 7 21:23:38 UTC 2010
Date: Sunday, March 7, 2010 @ 16:23:38
Author: paul
Revision: 71602
added missing rc.d and config files
Added:
bittorrent/trunk/bttrack
bittorrent/trunk/bttrack.conf
--------------+
bttrack | 43 +++++++++++++++++++++++++++++++++++++++++++
bttrack.conf | 21 +++++++++++++++++++++
2 files changed, 64 insertions(+)
Added: bttrack
===================================================================
--- bttrack (rev 0)
+++ bttrack 2010-03-07 21:23:38 UTC (rev 71602)
@@ -0,0 +1,43 @@
+#!/bin/bash
+# PID=`pidof -o %PPID /usr/bin/bittorrent-tracker --port 5000 --dfile /var/db/bt --bind 192.168.1.2 --allowed_dir /var/torrents`
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/python /usr/bin/bittorrent-tracker`
+
+case "$1" in
+ start)
+ stat_busy "Starting Bittorrent Tracker"
+ if [ -z "$PID" ]; then
+ /usr/bin/python /usr/bin/bittorrent-tracker `sed 's/[#].*$//' /etc/bttrack.conf` >> /var/log/bttrack.log &
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon bttrack
+ stat_done
+ fi
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Bittorrent Tracker"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon bttrack
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+
+# Author: Anthony Rossi
Added: bttrack.conf
===================================================================
--- bttrack.conf (rev 0)
+++ bttrack.conf 2010-03-07 21:23:38 UTC (rev 71602)
@@ -0,0 +1,21 @@
+#################################################################################
+##
+## Configuration for the Bittorrent Python-based tracker
+##
+## Not all options are listed here. To see all available options try:
+## /usr/bin/bittorrent-tracker -h
+##
+## Comments begin at the # symbol and go to the end of the line.
+##
+#################################################################################
+
+# Port to bind tracker to (default: 80)
+--port 5050
+# IP address to bind tracker to (default: all)
+#--bind 192.168.1.2
+# File to store the peers
+--dfile /var/db/bttrack
+# Directory to watch for torrents (no default)
+--allowed_dir /var/torrents
+# Allow users to download torrents tracked by this tracker (no default)
+--allow_get 1
More information about the arch-commits
mailing list