diff --git a/copy_local_keys.py b/copy_local_keys.py index 42ebb48..84f3405 100644 --- a/copy_local_keys.py +++ b/copy_local_keys.py @@ -1,4 +1,5 @@ import os +from functools import partial def mod_time(path): @@ -19,3 +20,7 @@ def find_newest_cert(root_dir, hostname): elif mod_time(fullpath) > mod_time(look_for[file]): look_for[file] = fullpath return look_for + + +def ensure_keys(key_dir, hostname): + files = (part.format(hostname) for part in ("{}.key.pem", "{}.chain.pem"))