summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Service.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/Property/Service.hs')
-rw-r--r--src/Propellor/Property/Service.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Propellor/Property/Service.hs b/src/Propellor/Property/Service.hs
index 0e96ed4c..46f9e8ef 100644
--- a/src/Propellor/Property/Service.hs
+++ b/src/Propellor/Property/Service.hs
@@ -11,17 +11,17 @@ type ServiceName = String
-- Note that due to the general poor state of init scripts, the best
-- we can do is try to start the service, and if it fails, assume
-- this means it's already running.
-running :: ServiceName -> Property NoInfo
+running :: ServiceName -> Property DebianLike
running = signaled "start" "running"
-restarted :: ServiceName -> Property NoInfo
+restarted :: ServiceName -> Property DebianLike
restarted = signaled "restart" "restarted"
-reloaded :: ServiceName -> Property NoInfo
+reloaded :: ServiceName -> Property DebianLike
reloaded = signaled "reload" "reloaded"
-signaled :: String -> Desc -> ServiceName -> Property NoInfo
-signaled cmd desc svc = p `describe` (desc ++ " " ++ svc)
+signaled :: String -> Desc -> ServiceName -> Property DebianLike
+signaled cmd desc svc = tightenTargets $ p `describe` (desc ++ " " ++ svc)
where
p = scriptProperty ["service " ++ shellEscape svc ++ " " ++ cmd ++ " >/dev/null 2>&1 || true"]
`assume` NoChange