From 050a5c6925a6ea7d82774892ee60acacf1fe2211 Mon Sep 17 00:00:00 2001 From: gru Date: Wed, 22 Apr 2026 08:50:16 +0200 Subject: [PATCH] Update install_rtorrent.py --- install_rtorrent.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/install_rtorrent.py b/install_rtorrent.py index 9d22339..a5cf43a 100644 --- a/install_rtorrent.py +++ b/install_rtorrent.py @@ -506,15 +506,16 @@ WantedBy=multi-user.target def write_rtorrent_config(user_home, username): config_path = Path(user_home) / ".rtorrent.rc" - config_content = f"""directory = /home/{username}/downloads + config_content = f""" +## https://git.linuxiarz.pl/gru/tools_scripts/_edit/master/install_rtorrent.py +directory = /home/{username}/downloads session = /home/{username}/.session -port_random = no +port_random = yes encoding_list = UTF-8 -schedule2 = watch_directory,5,5,load.normal=/home/{username}/watch/*.torrent -execute.nothrow = chmod,777,/home/{username}/downloads -network.scgi.open_port = 127.0.0.1:{DEFAULT_SCGI_PORT} -network.port_range.set = {DEFAULT_TORRENT_PORT}-{DEFAULT_TORRENT_PORT} +execute.nothrow = chmod,777,/home/rtorrent/downloads +network.scgi.open_port = 127.0.0.1:5000 +network.port_range.set = 51300-51310 network.port_random.set = no network.bind_address.set = 0.0.0.0 system.file.allocate.set = 1 @@ -524,6 +525,10 @@ protocol.pex.set = no trackers.use_udp.set = no protocol.encryption.set = allow_incoming,enable_retry,prefer_plaintext schedule2 = session_save,1200,43200,((session.save)) +schedule2 = tied_directory,6,5,start_tied= +schedule2 = untied_directory,7,5,stop_untied= +schedule2 = watch_directory,5,5,load.normal=/home/rtorrent/watch/*.torrent +ratio.max.set=-1 """ config_path.write_text(config_content) shutil.chown(config_path, user=username, group=username)