Can't run rtorrent as a service
1. I installed termux-services and rtorrent, then restarted termux.
2. Created a folder
mkdir -p $PREFIX/var/service/rtorrent/log
3. Created a "run" script inside $PREFIX/var/service/rtorrent
with the following code
4. Made the script executable with chmod +x run
5. Added a symbolic link ln -sf $PREFIX/share/termux-services/svlogger $PREFIX/var/service/rtorrent/log/run
6. sv start rtorrent and sv-enable rtorrent don't work.
The above workflow works witt other apps like iperf3?
How can I solve it and run rtorrent as a service?12 Replies
Have you tried to run rtorrent directly to see if it is even able to run without an error?
Yes, it rus without an error.
I had to create som sort of a tmux + rtorrent srcipt and check it with a cron job every minute
You never said it was actually running successfully...
Sorry for not clarifying it, rtorrent works when executed manually with
rtorrent
, however when I try to run it as a service, it doesn't work.Also are you 100% certain your config is not telling it to "quit after done seeding" / etc.?
I haven't add anythin, about seeding, launching it from the command line keeps it running even when no torrent is being actively seeded
Plus, are you passing in the flag via. the service thing to make sure it knows to run as a daemon / service?
Some programs have a command line argument which makes it know about this. An example program (I cannot think of the name right now) has it named
--daemon
or -d
I just googled it, it seems that I'll need to add a setting
system.daemon.set = true
I'll experiment with and see what happens.Yeah, that's probably it. I assume the program allows you to specify a specific config file on the command line?
^ @Magischian
I'll check You can add
-o key=value
to the rtorrent commandThat should probably work.
Of course, use whatever shell's quoting style where necessary, such as if
=
is a special character.
This made it work as a daemon.
Thanks for your help.