summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Apache.hs
diff options
context:
space:
mode:
authorJoey Hess2014-12-09 00:34:24 -0400
committerJoey Hess2014-12-09 00:34:24 -0400
commitb22201e36b608ba38f4d741268d04e7de3a966b8 (patch)
tree1256a0e4df4c79a3ddfb9a8c60657155c9ba01eb /src/Propellor/Property/Apache.hs
parentf8943c2036d91585f7afc3140b2442e7e78c284f (diff)
Fix Apache.siteEnabled to update the config file and reload apache when configuration has changed.
Diffstat (limited to 'src/Propellor/Property/Apache.hs')
-rw-r--r--src/Propellor/Property/Apache.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Propellor/Property/Apache.hs b/src/Propellor/Property/Apache.hs
index 1d9c35ce..1ce187d8 100644
--- a/src/Propellor/Property/Apache.hs
+++ b/src/Propellor/Property/Apache.hs
@@ -11,12 +11,15 @@ type ConfigFile = [String]
siteEnabled :: HostName -> ConfigFile -> RevertableProperty
siteEnabled hn cf = RevertableProperty enable disable
where
- enable = check (not <$> isenabled) $
- cmdProperty "a2ensite" ["--quiet", hn]
- `describe` ("apache site enabled " ++ hn)
- `requires` siteAvailable hn cf
+ enable = combineProperties ("apache site enabled " ++ hn)
+ [ siteAvailable hn cf
`requires` installed
`onChange` reloaded
+ , check (not <$> isenabled) $
+ cmdProperty "a2ensite" ["--quiet", hn]
+ `requires` installed
+ `onChange` reloaded
+ ]
disable = combineProperties
("apache site disabled " ++ hn)
(map File.notPresent (siteCfg hn))