Skip to content

Instantly share code, notes, and snippets.

@rcguy
Created January 28, 2017 11:15
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 rcguy/7155e49aee30cbd1c6c4a0379dc70afc to your computer and use it in GitHub Desktop.
Save rcguy/7155e49aee30cbd1c6c4a0379dc70afc to your computer and use it in GitHub Desktop.
[Unit]
Description=rTorrent Daemon
After=network.target
[Service]
Type=forking
KillMode=none
User=username
Group=username
ExecStartPre=-/bin/rm -f /home/username/.rtorrent/session/rtorrent.lock
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=%h
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment