Update scripts/stack_installers/install_rtorrent.py

This commit is contained in:
gru
2026-05-29 23:17:45 +02:00
parent 4c8debb103
commit 56a29c7a97

View File

@@ -567,7 +567,6 @@ def rtorrent_bind_address_directive(rtorrent_ref, rtorrent_version=None):
return "network.bind_address.set"
return "network.bind_address.ipv4.set"
def build_rtorrent_config_content(username, scgi_port, torrent_port, bind_address_directive):
return f"""
## https://git.linuxiarz.pl/gru/tools_scripts/_edit/master/install_rtorrent.py
@@ -597,13 +596,29 @@ schedule2 = watch_directory,60,60,load.normal=/home/{username}/watch/*.torrent
ratio.max.set = -1
network.xmlrpc.size_limit.set = 33554432
network.http.max_open.set = 64
network.max_open_sockets.set = 8192
network.max_open_files.set = 32768
network.http.dns_cache_timeout.set = 0
#pieces.memory.max.set = 1800M
""".lstrip()
network.http.max_open.set = 64
network.max_open_sockets.set = 1024
network.max_open_files.set = 8192
network.http.dns_cache_timeout.set = 25
network.http.ssl_verify_peer.set = 0
network.send_buffer.size.set = 4M
network.receive_buffer.size.set = 4M
throttle.min_peers.normal.set = 30
throttle.max_peers.normal.set = 150
throttle.min_peers.seed.set = -1
throttle.max_peers.seed.set = -1
throttle.max_downloads.global.set = 300
throttle.max_uploads.global.set = 300
throttle.max_downloads.set = 20
throttle.max_uploads.set = 20
trackers.numwant.set = 80
pieces.hash.on_completion.set = 0
#pieces.memory.max.set = 1024M
""".lstrip()
def write_rtorrent_config(user_home, username, scgi_port, torrent_port, bind_address_directive, *, force_config=False):
config_path = Path(user_home) / ".rtorrent.rc"