avoid ever removing all host keys
This commit is contained in:
parent
017e1928d4
commit
fd1e01c853
|
@ -98,8 +98,8 @@ hostKeys ctx l = propertyList desc $ catMaybes $
|
|||
staletypes = let have = map fst l in filter (`notElem` have) alltypes
|
||||
removestale b = map (File.notPresent . flip keyFile b) staletypes
|
||||
cleanup
|
||||
| null staletypes = Nothing
|
||||
| otherwise = Just $ property ("stale host keys removed " ++ typelist staletypes) $
|
||||
| null staletypes || null l = Nothing
|
||||
| otherwise = Just $ property ("any other ssh host keys removed " ++ typelist staletypes) $
|
||||
ensureProperty $
|
||||
combineProperties desc (removestale True ++ removestale False)
|
||||
`onChange` restarted
|
||||
|
|
Loading…
Reference in New Issue