1 |
On Wed, 2021-03-24 at 15:03 -0600, Grant Taylor wrote: |
2 |
> Hi, |
3 |
> |
4 |
> Does anyone have any pointers on where to start on converting a 10-15 |
5 |
> year old SysV style init script to OpenRC? |
6 |
|
7 |
I'd start with "man openrc-run", and then read the service-script- |
8 |
guide.md that is shipped & installed along with OpenRC. |
9 |
|
10 |
OpenRC is similar to SysV but with a few added features: |
11 |
|
12 |
* Dependencies (start service A before service B), |
13 |
|
14 |
* A "checkpath" helper for setting permissions (be careful with |
15 |
this, it's safer than chmod/chown but still not 100% secure), |
16 |
|
17 |
* The ability to "background" a daemon and manage the PIDfile |
18 |
itself, |
19 |
|
20 |
* Sane default behaviors that let you avoid boilerplate by declaring |
21 |
variables at the top of the service script. |