rtorrent.service 446 B

1234567891011121314151617
  1. # symlink this to /etc/systemd/system/
  2. [Unit]
  3. Description=rTorrent Daemon
  4. After=network.target
  5. [Service]
  6. Type=forking
  7. KillMode=none
  8. User=rtorrent
  9. ExecStart=/usr/bin/tmux new-session -c /mnt/storage/rtorrent -s rtorrent -n rtorrent -d rtorrent
  10. ExecStop=/usr/bin/bash -c "/usr/bin/tmux send-keys -t rtorrent C-q && while pidof rtorrent > /dev/null; do sleep 0.5; done"
  11. WorkingDirectory=%h
  12. Restart=on-failure
  13. [Install]
  14. WantedBy=multi-user.target