blob: 4645db2a654194f7e64576110d15a5296f63059f (
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=/run/user/%U/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
|