troglobit / finit

Fast init for Linux. Cookies included
https://troglobit.com/projects/finit/
MIT License
634 stars 64 forks source link

Add option to reload services in rdeps #416

Open troglobit opened 1 month ago

troglobit commented 1 month ago

When #415 is fixed a fundamental behavior introduced in v4.0 is changed. This issue propose adding a per-process option to tweak this behavior.

Using the example from #415, this per-process option could look like this:

sysklogd.conf:
    service if:udevd nowarn env:-/etc/default/sysklogd <run/udevadm:5/success> \
            [S0123456789] syslogd -F $SYSLOGD_ARGS -- System log daemon

iitod.conf:
    service [S0123456789] <!~pid/syslogd> iitod -- LED daemon

Here a ~ has been introduced to signify that iitod should be stopped (because of !) not just if the condition is lost, but also when it is in flux, which is the case when syslogd is reloaded.

Note: it may be worth looking into #330 during this task.