From ae7c1200337c480744dca711baf4f4c00127f652 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Tue, 5 Feb 2008 15:02:21 -0500 Subject: Adding a module to allow func to control certmaster via func, this will be more useful once we have support for local connections. --- scripts/certmaster-ca | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'scripts') diff --git a/scripts/certmaster-ca b/scripts/certmaster-ca index 867bd04..b3e844a 100755 --- a/scripts/certmaster-ca +++ b/scripts/certmaster-ca @@ -46,7 +46,7 @@ def main(args): errorprint('Must be root to run certmaster-ca') return 1 - cm = func.certmaster.CertMaster('/etc/func/certmaster.conf') + cm = func.certmaster.CertMaster() (opts, args) = parseargs(args) @@ -84,17 +84,7 @@ def main(args): return 1 for hn in args: - csrglob = '%s/%s.csr' % (cm.cfg.csrroot, hn) - csrs = glob.glob(csrglob) - certglob = '%s/%s.cert' % (cm.cfg.certroot, hn) - certs = glob.glob(certglob) - if not csrs and not certs: - errorprint('No match for %s to clean up' % hn) - continue - - for fn in csrs + certs: - print 'Cleaning out %s for host matching %s' % (fn, hn) - os.unlink(fn) + cm.remove_this_host(hn) return 0 -- cgit