summaryrefslogtreecommitdiffstats
path: root/install/restart_scripts/renew_ca_cert
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2013-10-15 17:47:12 +0000
committerMartin Kosek <mkosek@redhat.com>2014-01-08 09:47:23 +0100
commit911f5e9eb76099f8e5cfcff1232c1b10ad05b45a (patch)
treecdb649813d809697b55e409794b547f45f26d260 /install/restart_scripts/renew_ca_cert
parent4a64a1f18bd51c65bf34a13fd7541e1d6b4b75fd (diff)
downloadfreeipa-911f5e9eb76099f8e5cfcff1232c1b10ad05b45a.tar.gz
freeipa-911f5e9eb76099f8e5cfcff1232c1b10ad05b45a.tar.xz
freeipa-911f5e9eb76099f8e5cfcff1232c1b10ad05b45a.zip
PKI service restart after CA renewal failed
Fix both the service restart procedure and registration of old pki-cad well known service name. This patch was adapted from original patch of Jan Cholasta 178 to fix ticket 4092. https://fedorahosted.org/freeipa/ticket/4092
Diffstat (limited to 'install/restart_scripts/renew_ca_cert')
-rw-r--r--install/restart_scripts/renew_ca_cert16
1 files changed, 9 insertions, 7 deletions
diff --git a/install/restart_scripts/renew_ca_cert b/install/restart_scripts/renew_ca_cert
index 714a79d7c..da2253b4c 100644
--- a/install/restart_scripts/renew_ca_cert
+++ b/install/restart_scripts/renew_ca_cert
@@ -49,6 +49,7 @@ api.finalize()
configured_constants = dogtag.configured_constants(api)
alias_dir = configured_constants.ALIAS_DIR
+dogtag_service = ipaservices.knownservices[configured_constants.SERVICE_NAME]
dogtag_instance = configured_constants.PKI_INSTANCE_NAME
# Fetch the new certificate
@@ -106,12 +107,13 @@ if nickname == 'auditSigningCert cert-pki-ca':
# off the servlet to verify that the CA is actually up and responding so
# when this returns it should be good-to-go. The CA was stopped in the
# pre-save state.
-syslog.syslog(syslog.LOG_NOTICE, 'Starting %sd' % dogtag_instance)
+syslog.syslog(syslog.LOG_NOTICE, 'Starting %s' % dogtag_service.service_name)
try:
- if configured_constants.DOGTAG_VERSION == 9:
- ipaservices.knownservices.pki_cad.start(dogtag_instance)
- else:
- ipaservices.knownservices.pki_tomcatd.start(dogtag_instance)
+ dogtag_service.start(dogtag_instance)
except Exception, e:
- syslog.syslog(syslog.LOG_ERR, "Cannot start %sd: %s" %
- (dogtag_instance, str(e)))
+ syslog.syslog(
+ syslog.LOG_ERR,
+ "Cannot start %s: %s" % (dogtag_service.service_name, e))
+else:
+ syslog.syslog(
+ syslog.LOG_NOTICE, "Started %s" % dogtag_service.service_name)