I would like to know if there is something more than
https://docs.freebsd.org/en/articles/rc-scripting/ and man rc.subr(8)?
Every now and then I need to write some rc script for customer services
or fix some existing rc script which became broken after update of base
or some packages. Starting the interpreted (node.js, python etc.)
services are often way more complicated than what is described in
handbook but I always spend about 30% of time by doing the start part
and 70% of doing the part required to stop the service - matching
command / interpreter / procname is not an easy task and debugging it is
even more complicated. Almost always one need to tune just these 3
variables command, command_interpreter, procname but it is sometimes too
difficult if one do not have deep knowledge of how things works in
rc.subr and sometimes even reading the source of rc.subr is not clear to me.
So is there some detailed manual how to put things together in edge
cases where service is interpreted, running from Pyhton virtualenv,
there are symlinks in path so the real path shown by "ps" is different
than the path used to start the service and so on.
Kind regards
Miroslav Lachman