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

+1
View File
@@ -76,6 +76,7 @@ assert_delay 3 4 4 5
assert_delay 4 5 4 5
say 'The restart counter stops where the delay peaks'
assert "Delay and limit in status" "$(texec initctl status crash | sed -n 's/.*Restart in : //p')" = "4 sec (max 4)"
assert "Restart counter is 2" "$(texec initctl status crash | awk '/Restarts/{ print $4 }')" = "(2/-1)"
sep