Here is my systemd file rtorrent.service
Code: Select all
[Unit]
Description=rTorrent
After=network.target
[Service]
UMask=077
Type=forking
KillMode=none
User=scouseman
ExecStartPre=-/bin/rm -f /home/scouseman/downloads/session/rtorrent.lock
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/local/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/local/bin/rtorrent
WorkingDirectory=/home/scouseman/downloads/
[Install]
WantedBy=multi-user.target
Code: Select all
sudo systemctl enable rtorrent
sudo systemctl daemon-reload
sudo systemctl start rtorrent
sudo systemctl status rtorrent
But the service is still not running● rtorrent.service - rTorrent
Loaded: loaded (/etc/systemd/system/rtorrent.service; enabled)
Active: active (running) since Wed 2018-03-21 23:31:19 GMT; 23min ago
Main PID: 971 (screen)
CGroup: /system.slice/rtorrent.service
├─971 /usr/bin/SCREEN -d -m -fa -S rtorrent /usr/local/bin/rtorrent
└─979 /usr/local/bin/rtorrent
Mar 21 23:54:53 Openmediavault systemd[1]: Started rTorrent.
If I run the start line out of the systemd file at the command prompt it works
Code: Select all
/usr/bin/screen -d -m -fa -S rtorrent /usr/local/bin/rtorrent
There are also no errors in the systemd log.
Anyone any ideas what I have done wrong?
Cheers