summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Postfix.hs
diff options
context:
space:
mode:
authorJoey Hess2015-12-06 13:30:50 -0400
committerJoey Hess2015-12-06 13:30:50 -0400
commit94f91a44810dc3a1eca95c843e3c444cbbe87006 (patch)
tree1a4cee76e0b189e7a07fa563ee5401e3130741a4 /src/Propellor/Property/Postfix.hs
parentf404f5ed9a79449c620fde5bd669ab41fcb8d0fb (diff)
add isNewerThan and use it to avoid unnecessary running of newaliases
Diffstat (limited to 'src/Propellor/Property/Postfix.hs')
-rw-r--r--src/Propellor/Property/Postfix.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Propellor/Property/Postfix.hs b/src/Propellor/Property/Postfix.hs
index bcb9fb30..e9fdfc38 100644
--- a/src/Propellor/Property/Postfix.hs
+++ b/src/Propellor/Property/Postfix.hs
@@ -60,8 +60,9 @@ mappedFile f setup = setup f
-- | Run newaliases command, which should be done after changing
-- @/etc/aliases@.
newaliases :: Property NoInfo
-newaliases = cmdProperty "newaliases" []
- `assume` MadeChange
+newaliases = check ("/etc/aliases" `isNewerThan` "/etc/aliases.db") $
+ cmdProperty "newaliases" []
+ `assume` MadeChange
-- | The main config file for postfix.
mainCfFile :: FilePath