Open pascal-fb-martin opened 1 year ago
The documentation up on smarden.org is very outdated and references multiple things that are no longer true. It is in dire need of a refresh or even rewrite from scratch. The same is true of the documentation source files in this repo; they have not been touched since Void Linux forked runit. The only updated form of documentation is the manual pages.
In general, runit has no concept of service dependencies, so any condition that must be met before a service can start must be manually ensured in the service's run
script. For simply depending on a service, this would be like sv start <dependency> || exit 1
like the first cited paragraph indicates.
For logging, things get more complex to explain as behaviour will depend on many factors.
First, if the service has no /log
subservice*, output will be put in runsvdir
's commandline (visible in ps
, htop
, etc). If the logger subservice exists, output will be sent to it.
Assuming Void Linux's setup, this subservice will start an instance of vlogger
, which by-default will internally write anything it receives to syslog. A separate service collects syslog contents and writes it to disk.
There should be no need to manually check for a system logging service when using the /log
subservice since runsv
will always ensure it runs if it exists.
*It's worth noting that runit does not support any other subservice than the log
one.
If you want to run service daemons that do not support service supervision as described above, please refer to this page about service dependencies I wrote some time ago.
I am not sure what "do not support service supervision" means. The service I depend on is also started through runit.
This is unrelated; the way runit functions is that it starts a program and keeps track of it as a child process. This is called service supervision. However, the "classic" way to do services involves letting them fork in the background and keeping note of their PID. The link talks (amongst other things) about adapting those forking services to runit.
The svwaitup is nowhere to be found on a newly installed Void Linux (using void-live-x86_64-20230628-base.iso).
This utility and many more ceased to be built by default by runit's build system since runit 1.4.0, from March of 2006. sv start
is the new and correct way to do it.
I am going through the runit documentation, starting with the Q&A:
Following the "documentation" link above leads to this less clear description:
I am not sure what "do not support service supervision" means. The service I depend on is also started through runit.
Following the this page link above leads to a third seemingly conflicting description:
The svwaitup is nowhere to be found on a newly installed Void Linux (using void-live-x86_64-20230628-base.iso).
Which of these three pages should I believe?