-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
188 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
############################################################################# | ||
# A minimal rTorrent configuration that provides the basic features | ||
# you want to have in addition to the built-in defaults. | ||
# | ||
# See https://github.com/rakshasa/rtorrent/wiki/CONFIG-Template | ||
# for an up-to-date version. | ||
############################################################################# | ||
|
||
# Instance layout (base paths) | ||
method.insert = cfg.basedir, private|const|string, (cat,"/home/USERNAME/rtorrent/") | ||
method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/") | ||
method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/") | ||
method.insert = cfg.logfile, private|const|string, (cat,(cfg.logs),"rtorrent-",(system.time),".log") | ||
|
||
# Listening port for incoming peer traffic (fixed; you can also randomize it) | ||
network.port_range.set = 50000-50000 | ||
network.port_random.set = no | ||
|
||
# Tracker-less torrent and UDP tracker support | ||
# (conservative settings for 'private' trackers, change for 'public') | ||
dht.mode.set = disable | ||
protocol.pex.set = no | ||
trackers.use_udp.set = no | ||
|
||
# Peer settings | ||
throttle.min_peers.normal.set = 20 | ||
throttle.max_peers.normal.set = 60 | ||
throttle.min_peers.seed.set = 30 | ||
throttle.max_peers.seed.set = 80 | ||
|
||
# Limits for file handle resources, this is optimized for | ||
# an `ulimit` of 1024 (a common default). You MUST leave | ||
# a ceiling of handles reserved for rTorrent's internal needs! | ||
network.http.max_open.set = 50 | ||
network.max_open_files.set = 600 | ||
network.max_open_sockets.set = 300 | ||
|
||
# Memory resource usage (increase if you have a large number of items loaded, | ||
# and/or the available resources to spend) | ||
pieces.memory.max.set = 1800M | ||
network.xmlrpc.size_limit.set = 2M | ||
|
||
# Basic operational settings (no need to change these) | ||
session.path.set = (cat, (cfg.basedir), ".session") | ||
directory.default.set = (cat, (cfg.basedir), "download") | ||
|
||
# Watch directories (add more as you like, but use unique schedule names) | ||
schedule2 = watch_start, 10, 10, ((load.start, (cat, (cfg.watch), "start/*.torrent"))) | ||
schedule2 = watch_load, 11, 10, ((load.normal, (cat, (cfg.watch), "load/*.torrent"))) | ||
|
||
# Logging: | ||
# Levels = critical error warn notice info debug | ||
# Groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_* | ||
print = (cat, "Logging to ", (cfg.logfile)) | ||
log.open_file = "log", (cfg.logfile) | ||
log.add_output = "info", "log" | ||
#log.add_output = "tracker_debug", "log" | ||
|
||
### END of rtorrent.rc ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /bin/bash | ||
# | ||
# rTorrent startup script | ||
# | ||
umask 0027 | ||
cd $(dirname "$0") | ||
|
||
# Check for running process | ||
export RT_SOCKET=$PWD/.scgi_local | ||
test -S $RT_SOCKET && lsof $RT_SOCKET >/dev/null \ | ||
&& { echo "rTorrent already running"; exit 1; } | ||
test ! -e $RT_SOCKET || rm $RT_SOCKET | ||
|
||
# Clean up after rTorrent ends | ||
_at_exit() { | ||
stty sane | ||
test ! -e $RT_SOCKET || rm $RT_SOCKET | ||
} | ||
trap _at_exit INT TERM EXIT | ||
|
||
# Start rTorrent (optionally with configuration loaded | ||
# from the directory this script is stored in) | ||
rtorrent -D -I # -n -o import=$PWD/rtorrent.rc |