propellor spin
This commit is contained in:
parent
3e41d350f4
commit
f4ce2124ac
|
@ -6,6 +6,7 @@ import Propellor.Property.File
|
||||||
|
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
import Data.List
|
import Data.List
|
||||||
|
import Data.Char
|
||||||
|
|
||||||
installed :: Property
|
installed :: Property
|
||||||
installed = Apt.serviceInstalledRunning "postfix"
|
installed = Apt.serviceInstalledRunning "postfix"
|
||||||
|
@ -56,7 +57,9 @@ dedupMainCf = fileProperty "postfix main.cf dedupped" go mainCf
|
||||||
|
|
||||||
parse l
|
parse l
|
||||||
| "#" `isPrefixOf` l = Left l
|
| "#" `isPrefixOf` l = Left l
|
||||||
| "=" `isInfixOf` l = Right (separate (== '=') l)
|
| "=" `isInfixOf` l =
|
||||||
|
let (k, v) = separate (== '=') l
|
||||||
|
in Right ((filter (not . isSpace) k), v)
|
||||||
| otherwise = Left l
|
| otherwise = Left l
|
||||||
fmt k v = k ++ "=" ++ v
|
fmt k v = k ++ "=" ++ v
|
||||||
|
|
||||||
|
|
|
@ -396,6 +396,7 @@ kiteMailServer = propertyList "kitenet.net mail server"
|
||||||
, "CRON=1"
|
, "CRON=1"
|
||||||
, "NICE=\"--nicelevel 15\""
|
, "NICE=\"--nicelevel 15\""
|
||||||
] `onChange` Service.restarted "spamassassin"
|
] `onChange` Service.restarted "spamassassin"
|
||||||
|
`describe` "spamd enabled"
|
||||||
, Apt.serviceInstalledRunning "spamass-miter"
|
, Apt.serviceInstalledRunning "spamass-miter"
|
||||||
, Apt.installed ["maildrop"]
|
, Apt.installed ["maildrop"]
|
||||||
, "/etc/aliases" `File.hasPrivContentExposed` ctx
|
, "/etc/aliases" `File.hasPrivContentExposed` ctx
|
||||||
|
|
Loading…
Reference in New Issue