summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFélix Sipma2018-02-23 16:33:53 +0100
committerFélix Sipma2018-02-23 16:33:53 +0100
commit788ad7bcff61147dbdde484d8d56ff6aead82659 (patch)
tree230d1df9c33bdd6cb45dc8a1206f966cd384b984 /src
parentfad7824a13580f505549cc746589c94542bec9cb (diff)
add installed property to Openssl
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/Property/Openssl.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Propellor/Property/Openssl.hs b/src/Propellor/Property/Openssl.hs
index eb373e49..1967301c 100644
--- a/src/Propellor/Property/Openssl.hs
+++ b/src/Propellor/Property/Openssl.hs
@@ -9,6 +9,9 @@ import Utility.FileMode
import Utility.SafeCommand
+installed :: Property DebianLike
+installed = Apt.installed ["openssl"]
+
dhparamsLength :: Int
dhparamsLength = 2048
@@ -18,7 +21,7 @@ dhparams = "/etc/ssl/private/dhparams.pem"
safeDhparams :: Property DebianLike
safeDhparams = propertyList "safe dhparams" $ props
& File.dirExists (takeDirectory file)
- & Apt.installed ["openssl"]
+ & installed
& check (not <$> doesFileExist file) (createDhparams file length')
createDhparams :: FilePath -> Int -> Property UnixLike