summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific
diff options
context:
space:
mode:
authorJoey Hess2018-11-11 16:50:39 -0400
committerJoey Hess2018-11-11 16:50:39 -0400
commit46094ef8464eecdea78fb1c9e5fd6906054fa207 (patch)
tree427d6429b7f6df3e2c365c9407775f93b630fcc7 /src/Propellor/Property/SiteSpecific
parent428cc2bd902dd7634a1744964c0aa56530a8ea19 (diff)
method for enabling spamd has changed in testing/unstable
Diffstat (limited to 'src/Propellor/Property/SiteSpecific')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 0ed7a629..cde3c49e 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -400,23 +400,31 @@ podcatcher = Cron.niceJob "podcatcher run hourly" (Cron.Times "55 * * * *")
"xargs git-annex importfeed -c annex.genmetadata=true < feeds; mr --quiet update"
`requires` Apt.installed ["git-annex", "myrepos"]
-kiteMailServer :: Property (HasInfo + DebianLike)
-kiteMailServer = propertyList "kitenet.net mail server" $ props
- & Postfix.installed
- & Apt.installed ["postfix-pcre"]
- & Apt.serviceInstalledRunning "postgrey"
+spamdEnabled :: Property DebianLike
+spamdEnabled = tightenTargets $
+ cmdProperty "update-rc.d" ["spamassassin", "enable"]
+ `assume` MadeChange
+spamassassinConfigured :: Property DebianLike
+spamassassinConfigured = propertyList "spamassassin configured" $ props
& Apt.serviceInstalledRunning "spamassassin"
& "/etc/default/spamassassin" `File.containsLines`
[ "# Propellor deployed"
- , "ENABLED=1"
, "OPTIONS=\"--create-prefs --max-children 5 --helper-home-dir\""
, "CRON=1"
, "NICE=\"--nicelevel 15\""
- ] `onChange` Service.restarted "spamassassin"
- `describe` "spamd enabled"
+ ]
+ `describe` "spamd configured"
+ `onChange` spamdEnabled
+ `onChange` Service.restarted "spamassassin"
`requires` Apt.serviceInstalledRunning "cron"
+kiteMailServer :: Property (HasInfo + DebianLike)
+kiteMailServer = propertyList "kitenet.net mail server" $ props
+ & Postfix.installed
+ & Apt.installed ["postfix-pcre"]
+ & Apt.serviceInstalledRunning "postgrey"
+ & spamassassinConfigured
& Apt.serviceInstalledRunning "spamass-milter"
-- Add -m to prevent modifying messages Subject or body.
& "/etc/default/spamass-milter" `File.containsLine`