summarylogtreecommitdiffstats
path: root/aria2-system.service
blob: 790bd15bc0d42e7447326861d889c9260cfdfb6a (plain)
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
[Unit]
Description=System Wide Aria2c Daemon
After=network-online.target
Wants=network-online.target
PartOf=aria2.target

[Service]
Type=forking
User=aria2cd
# Arguments here will override config file.
ExecStart=/usr/bin/aria2c --no-conf=true --conf-path=/etc/aria2cd/aria2.conf \
    --dir=/var/lib/aria2cd/Downloads --remote-time=true --daemon=true --enable-rpc=true \
    --bt-enable-lpd=true --bt-save-metadata=true \
    --enable-dht=true --enable-dht6=true \
    --optimize-concurrent-downloads=true \
    --parameterized-uri=true \
    --save-session=/var/lib/aria2cd/aria2.session \
    --input-file=/var/lib/aria2cd/aria2.session \
    --dht-file-path=/var/lib/aria2cd/aria2.dht \
    --dht-file-path6=/var/lib/aria2cd/aria2.dht6 \
    --save-cookies=/var/lib/aria2cd/aria2.cookies \
    --load-cookies=/var/lib/aria2cd/aria2.cookies \
    --log=/var/log/aria2cd.log
ExecReload=/usr/bin/kill -HUP ${MAINPID}

# Sandboxing
ProtectSystem=strict
ReadWritePaths=/var/lib/aria2cd /var/log/aria2cd.log
ReadOnlyPaths=/etc/aria2cd
NoExecPaths=/
ExecPaths=/usr/bin/aria2c /usr/lib
ProtectHome=yes
NoNewPrivileges=yes

[Install]
WantedBy=aria2.target