diff options
author | zhanghua000 | 2022-10-26 16:23:22 +0800 |
---|---|---|
committer | zhanghua000 | 2022-10-26 16:23:22 +0800 |
commit | 37b232e22f367370d33ea3f7bddb41b6d606a0ef (patch) | |
tree | 25defd8fd1c1fc7362c84cf6a20a401cebeb4590 /aria2-system.service | |
parent | 58bf3c46184f3d7e3ed506ab91f027ed8f1f14ef (diff) | |
download | aur-37b232e22f367370d33ea3f7bddb41b6d606a0ef.tar.gz |
Rewrite code
Diffstat (limited to 'aria2-system.service')
-rw-r--r-- | aria2-system.service | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/aria2-system.service b/aria2-system.service new file mode 100644 index 000000000000..d462c9593703 --- /dev/null +++ b/aria2-system.service @@ -0,0 +1,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 +ProtectHome=yes + + +[Install] +WantedBy=aria2.target |