forked from crazy-max/docker-rtorrent-rutorrent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.rtlocal.rc
50 lines (39 loc) · 2.09 KB
/
.rtlocal.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Launch as a daemon
system.daemon.set = true
# Instance layout
method.insert = cfg.basedir, private|const|string, (cat,"/data/rtorrent/")
method.insert = cfg.download, private|const|string, (cat,"/downloads/")
method.insert = cfg.download_complete, private|const|string, (cat,(cfg.download),"complete/")
method.insert = cfg.download_temp, private|const|string, (cat,(cfg.download),"temp/")
method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/")
method.insert = cfg.session, private|const|string, (cat,(cfg.basedir),".session/")
method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/")
method.insert = cfg.rundir, private|const|string, (cat,"/var/run/rtorrent/")
# Gets the full path of data of a torrent (it's a workaround for the possibly empty 'd.base_path' attribute)
method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))"
# Default directory to save the downloaded torrents
directory.default.set = (cat,(cfg.download_temp))
# Default session directory
session.path.set = (cat,(cfg.session))
# PID file
execute.nothrow = sh,-c,(cat,"echo >",(cfg.rundir),"rtorrent.pid"," ",(system.pid))
# SCGI socket and make it group-writable and secure
network.scgi.open_local = (cat, (cfg.rundir), "scgi.socket")
schedule2 = scgi_permission, 0, 0, (cat,"execute.nothrow=chmod,\"g+w,o=\",",(cfg.rundir),"scgi.socket")
# Listening port for incoming peer traffic
network.port_range.set = @RT_INC_PORT@-@RT_INC_PORT@
network.port_random.set = no
# UDP port to use for DHT
dht.port.set = @RT_DHT_PORT@
# XMLRPC size limit
network.xmlrpc.size_limit.set = @XMLRPC_SIZE_LIMIT@
# Logging
## levels = critical error warn notice info debug
## groups = connection_* dht_* peer_* rpc_* storage_* thread_* tracker_* torrent_*
log.open_file = "log",(cat,(cfg.logs),"rtorrent.log")
log.add_output = "@RT_LOG_LEVEL@","log"
log.add_output = "rpc_events","log"
#log.execute = (cat,(cfg.logs),"execute.log")
#log.xmlrpc = (cat,(cfg.logs),"xmlrpc.log")
# Initialize plugins
execute2 = {sh,-c,/usr/bin/php7 /var/www/rutorrent/php/initplugins.php rtorrent &}