aboutsummaryrefslogtreecommitdiffstats
path: root/user/rtorrent.service
blob: 8080aaeaedbad735962cece224e90398dbd2aab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[Unit]
Description=rTorrent
After=network.target local-fs.target
ConditionFileIsExecutable=/usr/bin/tmux
ConditionFileIsExecutable=/usr/bin/rtorrent


[Service]
Type=forking
KillMode=none
Environment=TMUX_TMPDIR=%t/tmux
ExecStartPre=/usr/bin/mkdir -p $TMUX_TMPDIR
ExecStartPre=/usr/bin/mkdir -p /home/%u/Downloads/rtorrent/tmp
ExecStartPre=/usr/bin/mkdir -p /home/%u/Downloads/rtorrent/session
ExecStart=/usr/bin/tmux -L rt new-session -s rt -n rtorrent -d rtorrent
ExecStop=/usr/bin/tmux -L rt send-keys -t rt:rtorrent C-q
WorkingDirectory=/home/%u/Downloads
Restart=on-failure

[Install]
WantedBy=default.target