I decided to finally upgrade my system from init.d to systemd.
Pretty much everything went smoothly except my rtorrent+screen startup.
I'm using mostly the ruTorrent webui for controlling rtorrent. I'm using a service that starts rTorrent in a detatched GNU screen.
This is my problem, when I start the service, rtorrent is just king of sleeping and not responding/doesn't create a SCGI socket I use to connect my webui to the rtorrent client.
If I attach the screen the problem goes away and rtorrent resumes normal operation. If I run the exact same commands through a shell, it also works perfectly.
I've also tried to run a basic screen as a service with rtorrent in my ~/.screenrc .
Can anyone help? I've got no idea how to do debug this more than checking so that rtorrent and the service are running.
This is my service:
[Unit] Description=rTorrent [Service] Type=forking ExecStart=/usr/bin/screen -d -m -S rtorrent /usr/bin/rtorrent ExecStop=/usr/bin/killall -w -s 2 rtorrent [Install] WantedBy=multi-user.target
My systemctl status output:
rtorrent.service - rTorrent Loaded: loaded (/etc/systemd/system/rtorrent.service; enabled) Active: active (running) since Thu 2013-01-24 21:50:10 CET; 54s ago Process: 1130 ExecStart=/usr/bin/screen -d -m -S rtorrent /usr/bin/rtorrent (code=exited, status=0/SUCCESS) Main PID: 1131 (screen) CGroup: name=systemd:/system/rtorrent.service 1131 /usr/bin/SCREEN -d -m -S rtorrent /usr/bin/rtorrent 1133 rtorrent Jan 24 21:50:10 Laptop systemd: Starting rTorrent... Jan 24 21:50:10 Laptop systemd: Started rTorrent.
ps -aux | grep rtorrent output
root 1131 0.0 0.0 15560 1008 ? Ss 21:50 0:00 /usr/bin/SCREEN -d -m -S rtorrent /usr/bin/rtorrent root 1133 0.0 0.1 201528 5172 pts/0 Ssl+ 21:50 0:00 rtorrent
Last edited by alf (2013-01-25 10:25:17)
Same thing happening to me. Tried both screen and tmux, from the scripts I ve found in the forum, that supposedly work for others.
This works for me, YMMV:
[Unit] Description=Detached screen session After=network.target [Service] Type=oneshot RemainAfterExit=yes User=tomk ExecStart=/usr/bin/screen -dm [Install] Wants=network.target WantedBy=multi-user.target
... screen -t rtorrent 5 /usr/bin/rtorrent ...