From 7115d1ec162b4059b3e8e8f84bd8d5898c1db025 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 14 May 2014 19:41:05 -0400 Subject: moved source code to src This is to work around OSX's brain-damange regarding filename case insensitivity. Avoided moving config.hs, because it's a config file. Put in a symlink to make build work. --- Propellor/Property/Apache.hs | 62 -------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 Propellor/Property/Apache.hs (limited to 'Propellor/Property/Apache.hs') diff --git a/Propellor/Property/Apache.hs b/Propellor/Property/Apache.hs deleted file mode 100644 index cf3e62cc..00000000 --- a/Propellor/Property/Apache.hs +++ /dev/null @@ -1,62 +0,0 @@ -module Propellor.Property.Apache where - -import Propellor -import qualified Propellor.Property.File as File -import qualified Propellor.Property.Apt as Apt -import qualified Propellor.Property.Service as Service - -type ConfigFile = [String] - -siteEnabled :: HostName -> ConfigFile -> RevertableProperty -siteEnabled hn cf = RevertableProperty enable disable - where - enable = trivial $ cmdProperty "a2ensite" ["--quiet", hn] - `describe` ("apache site enabled " ++ hn) - `requires` siteAvailable hn cf - `requires` installed - `onChange` reloaded - disable = trivial $ File.notPresent (siteCfg hn) - `describe` ("apache site disabled " ++ hn) - `onChange` cmdProperty "a2dissite" ["--quiet", hn] - `requires` installed - `onChange` reloaded - -siteAvailable :: HostName -> ConfigFile -> Property -siteAvailable hn cf = siteCfg hn `File.hasContent` (comment:cf) - `describe` ("apache site available " ++ hn) - where - comment = "# deployed with propellor, do not modify" - -modEnabled :: String -> RevertableProperty -modEnabled modname = RevertableProperty enable disable - where - enable = trivial $ cmdProperty "a2enmod" ["--quiet", modname] - `describe` ("apache module enabled " ++ modname) - `requires` installed - `onChange` reloaded - disable = trivial $ cmdProperty "a2dismod" ["--quiet", modname] - `describe` ("apache module disabled " ++ modname) - `requires` installed - `onChange` reloaded - -siteCfg :: HostName -> FilePath -siteCfg hn = "/etc/apache2/sites-available/" ++ hn - -installed :: Property -installed = Apt.installed ["apache2"] - -restarted :: Property -restarted = cmdProperty "service" ["apache2", "restart"] - -reloaded :: Property -reloaded = Service.reloaded "apache2" - --- | Configure apache to use SNI to differentiate between --- https hosts. -multiSSL :: Property -multiSSL = "/etc/apache2/conf.d/ssl" `File.hasContent` - [ "NameVirtualHost *:443" - , "SSLStrictSNIVHostCheck off" - ] - `describe` "apache SNI enabled" - `onChange` reloaded -- cgit v1.2.3