diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-12-06 14:24:44 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-12-06 14:24:44 -0400 |
| commit | 030f13f2d0501c9fb42c8f1efa0a15fa63c94d67 (patch) | |
| tree | f81cbf9524d258daea72ab09866a6a8fe526c827 /src/Propellor/Property/Apache.hs | |
| parent | 94f91a44810dc3a1eca95c843e3c444cbbe87006 (diff) | |
allow using `check` on a UncheckedProperty, which yields a Property
Diffstat (limited to 'src/Propellor/Property/Apache.hs')
| -rw-r--r-- | src/Propellor/Property/Apache.hs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/Propellor/Property/Apache.hs b/src/Propellor/Property/Apache.hs index 626d3879..9e192e84 100644 --- a/src/Propellor/Property/Apache.hs +++ b/src/Propellor/Property/Apache.hs @@ -37,9 +37,8 @@ siteEnabled hn cf = enable <!> disable [ siteAvailable hn cf `requires` installed `onChange` reloaded - , check (not <$> isenabled) $ - cmdProperty "a2ensite" ["--quiet", hn] - `assume` MadeChange + , check (not <$> isenabled) + (cmdProperty "a2ensite" ["--quiet", hn]) `requires` installed `onChange` reloaded ] @@ -63,15 +62,13 @@ siteAvailable hn cf = combineProperties ("apache site available " ++ hn) $ modEnabled :: String -> RevertableProperty NoInfo modEnabled modname = enable <!> disable where - enable = check (not <$> isenabled) $ - cmdProperty "a2enmod" ["--quiet", modname] - `assume` MadeChange + enable = check (not <$> isenabled) + (cmdProperty "a2enmod" ["--quiet", modname]) `describe` ("apache module enabled " ++ modname) `requires` installed `onChange` reloaded - disable = check isenabled $ - cmdProperty "a2dismod" ["--quiet", modname] - `assume` MadeChange + disable = check isenabled + (cmdProperty "a2dismod" ["--quiet", modname]) `describe` ("apache module disabled " ++ modname) `requires` installed `onChange` reloaded |
