From d1fdace57e9d8c34dba5cc21726e2fa4c6a70492 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 10 Apr 2014 01:46:33 -0400 Subject: propellor spin --- Propellor/Property/Service.hs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'Propellor/Property/Service.hs') diff --git a/Propellor/Property/Service.hs b/Propellor/Property/Service.hs index 2fb3e0c6..c6498e57 100644 --- a/Propellor/Property/Service.hs +++ b/Propellor/Property/Service.hs @@ -14,12 +14,18 @@ type ServiceName = String -- this means it's already running. running :: ServiceName -> Property running svc = Property ("running " ++ svc) $ do - void $ ensureProperty $ - scriptProperty ["service " ++ shellEscape svc ++ " start >/dev/null 2>&1 || true"] - return NoChange + void $ ensureProperty $ + scriptProperty ["service " ++ shellEscape svc ++ " start >/dev/null 2>&1 || true"] + return NoChange restarted :: ServiceName -> Property restarted svc = Property ("restarted " ++ svc) $ do void $ ensureProperty $ scriptProperty ["service " ++ shellEscape svc ++ " restart >/dev/null 2>&1 || true"] return NoChange + +reloaded :: ServiceName -> Property +reloaded svc = Property ("reloaded " ++ svc) $ do + void $ ensureProperty $ + scriptProperty ["service " ++ shellEscape svc ++ " reload >/dev/null 2>&1 || true"] + return NoChange -- cgit v1.2.3