Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Jul 2023 16:48:15 +0200
From:      Mateusz Piotrowski <0mp@FreeBSD.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: detailed manual for rc scripting
Message-ID:  <9A3F1FA1-37F0-402B-8C94-536480E15E90@FreeBSD.org>
In-Reply-To: <e70861f4-043c-3d1f-04b1-fd617d17fcee@quip.cz>
References:  <e70861f4-043c-3d1f-04b1-fd617d17fcee@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
Hey Miroslav,

> On 2. Mar 2023, at 21:32, Miroslav Lachman <000.fbsd@quip.cz> wrote:
>=20
> I would like to know if there is something more than =
https://docs.freebsd.org/en/articles/rc-scripting/ and man rc.subr(8)?
>=20
> 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.

I'm afraid there is nothing else.

Regarding the services running interpreted programs, I agree that the =
interface could be a bit more friendly.

Best,
Mateusz=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9A3F1FA1-37F0-402B-8C94-536480E15E90>