Update install_rtorrent.py
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user