diff options
Diffstat (limited to 'src/Propellor/Property/Prosody.hs')
| -rw-r--r-- | src/Propellor/Property/Prosody.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Propellor/Property/Prosody.hs b/src/Propellor/Property/Prosody.hs index 78a2c529..0e379e63 100644 --- a/src/Propellor/Property/Prosody.hs +++ b/src/Propellor/Property/Prosody.hs @@ -6,7 +6,6 @@ import Propellor.Base import qualified Propellor.Property.File as File import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.Service as Service -import System.Posix.Files type ConfigFile = [String] @@ -15,18 +14,16 @@ type Conf = String confEnabled :: Conf -> ConfigFile -> RevertableProperty confEnabled conf cf = enable <!> disable where - enable = check test prop + enable = dir `File.isSymlinkedTo` target `describe` ("prosody conf enabled " ++ conf) `requires` confAvailable conf cf `requires` installed `onChange` reloaded where - test = not <$> doesFileExist (confValPath conf) - prop = property "prosody conf in place" $ makeChange $ - createSymbolicLink target dir target = confValRelativePath conf dir = confValPath conf - confValRelativePath conf' = "../conf.avail" </> conf' <.> "cfg.lua" + confValRelativePath conf' = File.LinkTarget $ + "../conf.avail" </> conf' <.> "cfg.lua" disable = trivial $ File.notPresent (confValPath conf) `describe` ("prosody conf disabled " ++ conf) `requires` installed |
