May 17, 2016 at 12:11 #10530
That’s why using check-rtorrent-usb-disk.sh is IMHO better
Sure. But I see a problem here. Since rtorrent.service is wanted by multi-user.target, it will be started always. However, when in “USB-mode”, the start (and stop) of rtorrent should be controlled solely by check-rtorrent-usb-xxxx.sh. So what we see here is most likely that rtorrent is indeed started before the USB volume is mounted (due to dependency on multi-user.target). But after that – as a result of the USB attach event – check-rtorrent-usb-start.sh will kick in killing/restarting the already running rtorrent instance. Not very elegant. I think this can be avoided by simply disabling rtorrent.service (systemctl disable rtorrent.service) when USB operation is desired. But I would prefer having a single setting for that…
As for screen: No I have not tried. IMHO, it’s an ugly hack to work around design flaws of other programs (daemon-style apps that do not provide a proper daemon mode). AFAIK, rtorrent is the only one that uses it.May 17, 2016 at 14:43 #10531
Well, let’s see if we can add additionnal time for this, maybe adding a pre_start command, ie something like
use usb disk && sleep 30s || direct start of service
I don’t know if it’s possible to still use our specific service that checks usb devices …
Anyway, it was on broken on kodi (trying to remove the disk from kodi doesn’t work)
for rtorrent, I can propose the patch but I need someone else to test it (without screen)May 18, 2016 at 12:26 #10532
screen issue solved (was a problem with systemd)
just edit two files in lib/systemd/system/ (sshd@.service and telnetd@.service)
and do the modification like here https://github.com/OpenBricks/openbricks/commit/f8f305b3f8d7d650048f95657b7d0f9fa3545bf2May 20, 2016 at 08:42 #10533
great! thanks!October 31, 2016 at 22:47 #10969
These file modification could be made also in actual latest snapshot? I ask this because In snapshot of 19.10.2016 I see this problem again…November 1, 2016 at 18:55 #10970
I have a version of rtorrent without the need of screen. Did you have time to test it ?
Cheers !November 1, 2016 at 21:28 #10974
Yes of course! I will be happy to tes this for you. I’m not sure to do this tomorrow because 4 days ago my 2nd child is born… ^_^
May be the day after tomorrow.November 1, 2016 at 21:34 #10975
Just for sharing a script I solved rtorrent instability (rtorrent service is active but not existing screen session for it) I check if screen session exists every 5 minutes (with crond) executing this code:
#!/bin/bash screen -wipe sess='' sess=$(screen -ls | grep rtorrent | cut -d'.' -f 1) re='^[0-9]+$' if ! [[ $(echo $sess) =~ $re ]] ; then echo "rtorrent turned off" systemctl stop rtorrent && systemctl start rtorrent else echo "rtorrent turned on"
So, using regex I test output of screen -ls command matching ‘rtorrent’ string and get numeric part (fist before dot).
If it doesn’t exists I stop rtorrent service and start it again: this open new rtorrent screen session.
Adding more complexity, I use inadyn for reach my Cubox from internet and in my Android mobile I installed Torrentoise/transdrone app (both support user/password login) for manage my Cubox torrent from any part of the world.
So, when I click on my mobile in a magnet link a message confirm torrent is added on my Cubox rtorrent download list.
You must be logged in to reply to this topic.