diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-09-20 14:51:12 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-09-20 14:51:12 -0400 |
| commit | 2080b5f57f5d88466a786a494fb3bf9cb4d44996 (patch) | |
| tree | 94dc0d382340d6e275be09b937c5d549f6fbbdcf /src | |
| parent | 2f4340bb1b235f6aec9a6a28233ee28d82b499a3 (diff) | |
reload daemon on conf file change
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Aiccu.hs | 5 |
1 files 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 |
