initctl: show the restart delay of a service with restart-max-sec

With restart-max-sec the delay before the next restart varies, and
nothing showed what it was or how far it could grow.

Show both in initctl status, for a service that has the setting:

       Restarts : 7 (4/-1)
     Restart in : 160 sec (max 300)

Add the D-Bus properties RestartDelay and RestartDelayMax for it, so
the status is the same when initctl goes over D-Bus.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-19 20:39:43 +01:00
1 parent 7f652770e3
commit 308287923d
6 files changed
+30 -2

No files matched your search

+3 -1
View File
@@ -17,7 +17,9 @@ All relevant changes are documented in this file.
- Add `restart-max-sec`, a limit for the delay between restarts of a
crashing service. When set, the delay doubles for each restart, from
`restart-sec` up to the limit, and comes down again as the service keeps
running. Issue #306
running. `initctl status` shows the current delay and the limit, also
available as the D-Bus properties `RestartDelay` and `RestartDelayMax`.
Issue #306
- Add `stop-scope`, which processes a stop applies to: `pgroup`, the process
group of the main process (default), `process`, only the main process,
`cgroup`, the cgroup of the service, or `mixed` like systemd. Issue #413