X-Git-Url: https://v.licheni.net/stack/cam.git/blobdiff_plain/de74ecfb399e9c18e476104744856fde67ea2e81..112c04e3926d62291efd902a1dcb0b2d24feeb59:/lib/check.py diff --git a/lib/check.py b/lib/check.py deleted file mode 100644 index a6a67ec..0000000 --- a/lib/check.py +++ /dev/null @@ -1,26 +0,0 @@ - -import os -from time import time, strftime, localtime -from utils import * -from paths import * -from cfg import * - - -def check(): - now = time() - warning_days = 15 - if cfg.has_option('global', 'warning_days'): - warning_days = int(cfg.get('global', 'warning_days')) - for tag in cfg.sections(): - if tag == 'global' or tag == 'ca' or tag == 'DEFAULT': - continue - crt_file = getpath('rsa_crt', tag) - crt_date = getcertdate(crt_file) - if crt_date: - days = int((now - crt_date)/86400) - if days > -warning_days: - print ''' -The certificate '%s' should be renewed! -(Expiration date: %s) -''' % (tag, strftime('%d/%m/%Y', localtime(crt_date))) -