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