From 2080b5f57f5d88466a786a494fb3bf9cb4d44996 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 20 Sep 2015 14:51:12 -0400 Subject: reload daemon on conf file change --- src/Propellor/Property/Aiccu.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Propellor/Property/Aiccu.hs b/src/Propellor/Property/Aiccu.hs index e3070c90..7a1e6e18 100644 --- a/src/Propellor/Property/Aiccu.hs +++ b/src/Propellor/Property/Aiccu.hs @@ -40,9 +40,10 @@ config u t p = -- | Configures an ipv6 tunnel using sixxs.net, with the given TunneId -- and sixx.net UserName. hasConfig :: TunnelId -> UserName -> Property HasInfo -hasConfig t u = withSomePrivData [(Password (u++"/"++t)), (Password u)] (Context "aiccu") $ - property "aiccu configured" . writeConfig +hasConfig t u = prop `onChange` reloaded where + prop = withSomePrivData [(Password (u++"/"++t)), (Password u)] (Context "aiccu") $ + property "aiccu configured" . writeConfig writeConfig :: (((PrivDataField, PrivData) -> Propellor Result) -> Propellor Result) -> Propellor Result writeConfig getpassword = getpassword $ ensureProperty . go go (Password u', p) = confPath `File.hasContent` config u' t p -- cgit v1.2.3