Skip to content

Instantly share code, notes, and snippets.

@BtbN
Created August 6, 2019 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BtbN/3e4f7c9b43701429160c93781faa1fe4 to your computer and use it in GitHub Desktop.
Save BtbN/3e4f7c9b43701429160c93781faa1fe4 to your computer and use it in GitHub Desktop.
/etc/systemd/system/rtorrent@.service
[Unit]
Description=rTorrent
After=network.target
[Service]
Type=forking
KillMode=none
User=%I
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=/home/%I
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment