From 911f5e9eb76099f8e5cfcff1232c1b10ad05b45a Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 15 Oct 2013 17:47:12 +0000 Subject: 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 --- install/restart_scripts/stop_pkicad | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 install/restart_scripts/stop_pkicad (limited to 'install/restart_scripts/stop_pkicad') diff --git a/install/restart_scripts/stop_pkicad b/install/restart_scripts/stop_pkicad old mode 100644 new mode 100755 index 9c24a99e..c275eaee --- a/install/restart_scripts/stop_pkicad +++ b/install/restart_scripts/stop_pkicad @@ -29,15 +29,15 @@ api.bootstrap(context='restart') api.finalize() configured_constants = dogtag.configured_constants(api) +dogtag_service = ipaservices.knownservices[configured_constants.SERVICE_NAME] dogtag_instance = configured_constants.PKI_INSTANCE_NAME -syslog.syslog(syslog.LOG_NOTICE, "certmonger stopping %sd" % dogtag_instance) - +syslog.syslog(syslog.LOG_NOTICE, "Stopping %s" % dogtag_service.service_name) try: - if configured_constants.DOGTAG_VERSION == 9: - ipaservices.knownservices.pki_cad.stop(dogtag_instance) - else: - ipaservices.knownservices.pki_tomcatd.stop(dogtag_instance) + dogtag_service.stop(dogtag_instance) except Exception, e: - syslog.syslog(syslog.LOG_ERR, "Cannot stop %sd: %s" % - (dogtag_instance, str(e))) + syslog.syslog( + syslog.LOG_ERR, "Cannot stop %s: %s" % (dogtag_service.service_name, e)) +else: + syslog.syslog( + syslog.LOG_NOTICE, "Stopped %s" % dogtag_service.service_name) -- cgit