From 7d45dd722981582067a1a7017713ef2ac9198ee6 Mon Sep 17 00:00:00 2001 From: Matthew Lesko Date: Wed, 9 Aug 2017 10:07:57 -0400 Subject: [PATCH] use an onlyif+test check - if the human-readable text file is newer than the database file, (re)create --- manifests/dbfile.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/dbfile.pp b/manifests/dbfile.pp index fd97201..043a6c6 100644 --- a/manifests/dbfile.pp +++ b/manifests/dbfile.pp @@ -47,11 +47,11 @@ } else { - exec { "${postmap} ${title}": + exec { "${postmap} ${postfixdir}/${title}": cwd => $postfixdir, subscribe => File["${postfixdir}/${title}"], refreshonly => true, - # No need to notify the service, since it detects changed files + onlyif => "/usr/bin/test ${postfixdir}/${title} -nt ${postfixdir}/${title}.db" } }