Merge restart_httpd functionality to renew_ra_cert.

Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
Jan Cholasta 2013-10-16 09:04:21 +00:00 committed by Petr Viktorin
parent 2c466b79e8
commit fac6bf30b6
2 changed files with 11 additions and 9 deletions

View File

@ -34,6 +34,8 @@ def main():
api.bootstrap(context='restart')
api.finalize()
ca = cainstance.CAInstance(api.env.realm, certs.NSS_DIR)
if ca.is_renewal_master():
# Fetch the new certificate
db = certs.CertDB(api.env.realm)
dercert = db.get_cert_from_db(nickname, pem=False)

View File

@ -925,7 +925,7 @@ class CAInstance(service.Service):
pinfile='/etc/httpd/alias/pwdfile.txt',
secdir='/etc/httpd/alias',
pre_command=None,
post_command='restart_httpd')
post_command='renew_ra_cert')
except (ipautil.CalledProcessError, RuntimeError), e:
root_logger.error(
"certmonger failed to start tracking certificate: %s" % str(e))