summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Unbound.hs
diff options
context:
space:
mode:
authorFélix Sipma2015-09-17 09:13:13 +0200
committerJoey Hess2015-09-17 13:20:50 -0400
commit8cea12ce1a799175a7922b642591e1352826d17e (patch)
treeb2a46f75fb6ea54d15de4e7243f793d5aa07826d /src/Propellor/Property/Unbound.hs
parent19834cdd911629876e173cbd2e8e4889f117e7ed (diff)
Unbound: restart unbound when config in cachingDnsServer is modified
Signed-off-by: Félix Sipma <felix.sipma@no-log.org>
Diffstat (limited to 'src/Propellor/Property/Unbound.hs')
-rw-r--r--src/Propellor/Property/Unbound.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Propellor/Property/Unbound.hs b/src/Propellor/Property/Unbound.hs
index 68703dfd..6edb8b8b 100644
--- a/src/Propellor/Property/Unbound.hs
+++ b/src/Propellor/Property/Unbound.hs
@@ -54,6 +54,7 @@ config = "/etc/unbound/unbound.conf.d/propellor.conf"
cachingDnsServer :: [UnboundSection] -> [UnboundZone] -> [UnboundHost] -> Property NoInfo
cachingDnsServer sections zones hosts =
config `hasContent` (comment : otherSections ++ serverSection)
+ `onChange` restarted
where
comment = "# deployed with propellor, do not modify"
serverSection = genSection (fromMaybe ("server", []) $ find ((== "server") . fst) sections)