mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
On reload/restart we must wait for services to stop first
This patch adds support for declaring *why* a service is being stopped or reloaded. This is later used when all stopped services have been collected by the `service_monitor()` to issue start or postponed SIGHUP. As an added benefit we can now also see why a service is not running. If it has been paused by a user, halted when moving to another runlevel, waiting for a condition (event), or similar. Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b1d57d6828
commit
924bf041bc
9 files changed
+92
-36
No files matched your search
@@ -597,7 +597,7 @@ not return until the given command has fully completed.
|
||||
reload Reload *.conf in /etc/finit.d/, like SIGHUP
|
||||
runlevel <0-9> Change runlevel: 0 (halt), 6 (reboot)
|
||||
start <JOB#> Start a stopped service
|
||||
stop <JOB#> Stop a running service
|
||||
stop <JOB#> Stop/Pause a running service
|
||||
restart <JOB#> Restart (stop/start) a running service
|
||||
reload <JOB#> Reload (SIGHUP) a running service
|
||||
status | show List status of all services known to Finit
|
||||
@@ -610,6 +610,11 @@ their command counterparts. The `reload` command reloads all `*.conf`
|
||||
files in `/etc/finit.d/` *and* activates the changes, with `emit RELOAD`
|
||||
only the `*.conf` files are reloaded.
|
||||
|
||||
**Note:** The `emit STOP` event is more like "prepare" than "stop".
|
||||
Depending on how the service is declared, `<!>` or not, the service
|
||||
may be stopped, or skipped to be be sent `SIGHUP` later when `emit
|
||||
START` is issued.
|
||||
|
||||
To achieve the same result as `initctl reload` emit all three events:
|
||||
|
||||
```shell
|
||||
|
||||
Reference in new issue
Block a user