summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorJulien Dessaux2024-08-28 00:16:25 +0200
committerJulien Dessaux2024-08-28 00:16:25 +0200
commit518cbed9442fa6f66a3ee850de99c02e59522d80 (patch)
tree62c02f78919a748c17e281585d035c81f9fd95ac /stdlib
parentchore(gonf): change Promise() methods return type to be more specific (diff)
downloadgonf-518cbed9442fa6f66a3ee850de99c02e59522d80.tar.gz
gonf-518cbed9442fa6f66a3ee850de99c02e59522d80.tar.bz2
gonf-518cbed9442fa6f66a3ee850de99c02e59522d80.zip
feat(services): support service timers for which a running state means waiting
Diffstat (limited to 'stdlib')
-rw-r--r--stdlib/os/systemd/systemd.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/stdlib/os/systemd/systemd.go b/stdlib/os/systemd/systemd.go
index 298998e..46a35da 100644
--- a/stdlib/os/systemd/systemd.go
+++ b/stdlib/os/systemd/systemd.go
@@ -16,7 +16,8 @@ func isEnabled(name string) bool {
}
func isRunning(name string) bool {
- return systemctlShow(name, "SubState") == "running"
+ value := systemctlShow(name, "SubState")
+ return value == "running" || value == "waiting"
}
func systemctl(name, operation string) (gonf.Status, error) {