summaryrefslogtreecommitdiff
path: root/Property/Ssh.hs
diff options
context:
space:
mode:
authorJoey Hess2014-03-30 13:12:33 -0400
committerJoey Hess2014-03-30 13:12:33 -0400
commit8e7b296e820e7513c7846ceeb3fbd87d60bc95f4 (patch)
tree4eb80ad32b42ee871f5704cd1af99baf9e8cacc6 /Property/Ssh.hs
parente741b7b82e0b5be2809d1da7f54d8b0fcd0449e3 (diff)
split out Property.FIle
Diffstat (limited to 'Property/Ssh.hs')
-rw-r--r--Property/Ssh.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Property/Ssh.hs b/Property/Ssh.hs
index 141e3495..98149bcb 100644
--- a/Property/Ssh.hs
+++ b/Property/Ssh.hs
@@ -6,6 +6,7 @@ import System.FilePath
import Property
import Property.User
+import qualified Property.File as File
import Utility.SafeCommand
import Utility.Exception
@@ -18,8 +19,8 @@ sshdConfig = "/etc/ssh/sshd_config"
setSshdConfig :: String -> Bool -> Property
setSshdConfig setting allowed = combineProperties desc
- [ lineNotInFile sshdConfig $ sshline (not allowed)
- , lineInFile sshdConfig $ sshline allowed
+ [ sshdConfig `File.lacksLine` (sshline $ not allowed)
+ , sshdConfig `File.containsLine` (sshline allowed)
] `onChange` restartSshd
where
desc = unwords [ "ssh config:", setting, sshBool allowed ]