diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-01-04 13:42:01 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-01-04 13:42:01 -0400 |
| commit | bf34d6f423bd2da76938dfdc1cf4525dc17b97c5 (patch) | |
| tree | b69593791ebbc0ec266f236bc4139f0873dda984 /src/Propellor/Property/DnsSec.hs | |
| parent | 3d21a2df5433a725b6060d9533da86aacb7a6527 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/DnsSec.hs')
| -rw-r--r-- | src/Propellor/Property/DnsSec.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Propellor/Property/DnsSec.hs b/src/Propellor/Property/DnsSec.hs index f76a28ff..47fa9b32 100644 --- a/src/Propellor/Property/DnsSec.hs +++ b/src/Propellor/Property/DnsSec.hs @@ -44,19 +44,18 @@ zoneSigned domain zonefile = RevertableProperty setup cleanup `requires` toProp (keysInstalled domain) cleanup = combineProperties ("removed signed zone for " ++ domain) - [ File.notPresent signedzonefile + [ File.notPresent (signedZoneFile zonefile) , File.notPresent dssetfile , toProp (revert (keysInstalled domain)) ] - signedzonefile = dir </> domain ++ ".signed" dssetfile = dir </> "-" ++ domain ++ "." dir = takeDirectory zonefile -- Need to update the signed zone file if the zone file or -- any of the keys have a newer timestamp. needupdate = do - v <- catchMaybeIO $ getModificationTime signedzonefile + v <- catchMaybeIO $ getModificationTime (signedZoneFile zonefile) case v of Nothing -> return True Just t1 -> anyM (newerthan t1) $ @@ -110,3 +109,7 @@ isPublic k = k `elem` [PubZSK, PubKSK] isZoneSigningKey :: DnsSecKey -> Bool isZoneSigningKey k = k `elem` [PubZSK, PrivZSK] + +-- | dnssec-signzone makes a .signed file +signedZoneFile :: FilePath -> FilePath +signedZoneFile zonefile = zonefile ++ ".signed" |
