58 lines
3 KiB
Text
58 lines
3 KiB
Text
# Set an interface with IPv4 address to bind to:
|
||
method.insert = cfg.interface.bind, string|const|private, (cat,"wg0")
|
||
# Get IPv4 address of a given interface
|
||
method.insert = get_interface_ipv4_address, simple|private, "execute.capture=bash,-c,\"$cat=\\\"echo -n \$(ip -o -4 addr show \\\",$argument.0=,\\\" | grep -Po 'inet \\\\\\\\\\K[\\\\\\\\\\d.]+')\\\"\""
|
||
# The IP address the listening socket and outgoing connections is bound to. (bind)
|
||
schedule2 = set_bind_address, 0, 0, \
|
||
"branch=((cfg.interface.bind)), \
|
||
((network.bind_address.set,(get_interface_ipv4_address,(cfg.interface.bind))))"
|
||
|
||
dht.mode.set = on
|
||
dht.port.set = @dhtPort@
|
||
protocol.pex.set = yes
|
||
trackers.use_udp.set = yes
|
||
|
||
# Enable the default ratio group.
|
||
ratio.enable=
|
||
|
||
# Change the limits, the defaults should be sufficient.
|
||
ratio.min.set = 100
|
||
ratio.max.set = 300
|
||
ratio.upload.set = 20M
|
||
|
||
# To ensure world-readable results
|
||
umask = 0000
|
||
|
||
# Changing the command triggered when the ratio is reached.
|
||
# (the default is "d.try_close= ; d.ignore_commands.set=1")
|
||
method.set = group.seeding.ratio.command, "d.close= ; d.erase="
|
||
|
||
# Add new method to get finished dir (called get_finished_dir)
|
||
method.insert = d.get_finished_dir,simple,"cat=@finalDir@/,$d.custom1="
|
||
|
||
# Bind event "torrent has finished" to action "move to new directory based on label"
|
||
# method.set_key = event.download.finished,move_complete
|
||
# Modifies the event.download.finished event to also have a new “key”
|
||
# called “move_complete”. From what I understand, rTorrent executes all
|
||
# “keys” in an event whenever that event is fired. The
|
||
# event.download.finished event fires whenever a torrent has finished
|
||
# downloading. The stuff within the quotation marks is the new key’s
|
||
# commands. Each command is separated by a semicolon (;).
|
||
# d.directory.set=$d.get_finished_dir=;
|
||
# d.directory.set sets the directory of the torrent in rTorrent’s own
|
||
# information. It does not move the torrent, just means rTorrent will
|
||
# look in that directory from now on. $d.get_finished_dir just runs the
|
||
# get_finished_dir method preciously inserted; constructing a path name
|
||
# by combining [folder]/finished/ with whatever label was applied
|
||
# ($d.custom1 contains the label).
|
||
# execute=mkdir,-p,$d.get_finished_dir=;
|
||
# Gets the same path name and makes sure the directory actually exists.
|
||
# Mkdir is the standard *nix command for creating directories. -p means
|
||
# creating parent directories if needed and not complaining if directory
|
||
# already exists.
|
||
# execute=mv,-u,$d.base_path=,$d.get_finished_dir=
|
||
# Uses the same “execute” functionality as above to run the standard *nix
|
||
# mv command to move the torrent’s files (whose location is stored in
|
||
# d.base_path) to, once again, the directory whose name was constructed
|
||
# by the get_finished_dir method.
|
||
method.set_key = event.download.finished,move_complete,"d.directory.set=$d.get_finished_dir=;execute=mkdir,-p,$d.get_finished_dir=;execute=mv,-u,$d.base_path=,$d.get_finished_dir="
|