summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Nginx.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-04-02 15:33:48 -0400
committerJoey Hess <joeyh@joeyh.name>2016-04-02 15:33:48 -0400
commitdce7e7bd72fa82ef7461535288b53d89db807566 (patch)
treecf97100b90cddfd988d069059222df4bb8459bc5 /src/Propellor/Property/Nginx.hs
parentbeba93baede04835687e1caeefead24f173d9048 (diff)
parent48608a48bd91743776cf3d4abb2172b806d4b917 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Nginx.hs')
-rw-r--r--src/Propellor/Property/Nginx.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Propellor/Property/Nginx.hs b/src/Propellor/Property/Nginx.hs
index 8fb5c49b..e40ba657 100644
--- a/src/Propellor/Property/Nginx.hs
+++ b/src/Propellor/Property/Nginx.hs
@@ -9,7 +9,7 @@ import qualified Propellor.Property.Service as Service
type ConfigFile = [String]
-siteEnabled :: HostName -> ConfigFile -> RevertableProperty NoInfo
+siteEnabled :: HostName -> ConfigFile -> RevertableProperty DebianLike DebianLike
siteEnabled hn cf = enable <!> disable
where
enable = siteVal hn `File.isSymlinkedTo` siteValRelativeCfg hn
@@ -22,11 +22,11 @@ siteEnabled hn cf = enable <!> disable
`requires` installed
`onChange` reloaded
-siteAvailable :: HostName -> ConfigFile -> Property NoInfo
-siteAvailable hn cf = ("nginx site available " ++ hn) ==>
- siteCfg hn `File.hasContent` (comment : cf)
+siteAvailable :: HostName -> ConfigFile -> Property DebianLike
+siteAvailable hn cf = "nginx site available " ++ hn ==> tightenTargets go
where
comment = "# deployed with propellor, do not modify"
+ go = siteCfg hn `File.hasContent` (comment : cf)
siteCfg :: HostName -> FilePath
siteCfg hn = "/etc/nginx/sites-available/" ++ hn
@@ -37,11 +37,11 @@ siteVal hn = "/etc/nginx/sites-enabled/" ++ hn
siteValRelativeCfg :: HostName -> File.LinkTarget
siteValRelativeCfg hn = File.LinkTarget ("../sites-available/" ++ hn)
-installed :: Property NoInfo
+installed :: Property DebianLike
installed = Apt.installed ["nginx"]
-restarted :: Property NoInfo
+restarted :: Property DebianLike
restarted = Service.restarted "nginx"
-reloaded :: Property NoInfo
+reloaded :: Property DebianLike
reloaded = Service.reloaded "nginx"