From 3edf13cd8ab541908d7e2011a54e31edf1844ea2 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Fri, 17 Jun 2016 14:18:05 +1000 Subject: [PATCH] restart scripts: bootstrap api with in_server=True renew_ca_cert fails because it cannot access the 'config' plugin. Bootstrap all the restart scripts to avoid such issues. Fixes: https://fedorahosted.org/freeipa/ticket/5968 Reviewed-By: Jan Cholasta --- install/restart_scripts/renew_ca_cert | 2 +- install/restart_scripts/renew_ra_cert | 2 +- install/restart_scripts/restart_dirsrv | 2 +- install/restart_scripts/stop_pkicad | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install/restart_scripts/renew_ca_cert b/install/restart_scripts/renew_ca_cert index bfb726cdd..dc0f1117b 100644 --- a/install/restart_scripts/renew_ca_cert +++ b/install/restart_scripts/renew_ca_cert @@ -38,7 +38,7 @@ from ipaplatform.paths import paths def _main(): nickname = sys.argv[1] - api.bootstrap(context='restart') + api.bootstrap(in_server=True, context='restart') api.finalize() dogtag_service = services.knownservices['pki_tomcatd'] diff --git a/install/restart_scripts/renew_ra_cert b/install/restart_scripts/renew_ra_cert index 9b5e231b5..17a7af9b0 100644 --- a/install/restart_scripts/renew_ra_cert +++ b/install/restart_scripts/renew_ra_cert @@ -37,7 +37,7 @@ from ipaplatform.paths import paths def _main(): nickname = 'ipaCert' - api.bootstrap(context='restart') + api.bootstrap(in_server=True, context='restart') api.finalize() tmpdir = tempfile.mkdtemp(prefix="tmp-") diff --git a/install/restart_scripts/restart_dirsrv b/install/restart_scripts/restart_dirsrv index 856729b5c..a8e78184f 100644 --- a/install/restart_scripts/restart_dirsrv +++ b/install/restart_scripts/restart_dirsrv @@ -33,7 +33,7 @@ def _main(): except IndexError: instance = "" - api.bootstrap(context='restart') + api.bootstrap(in_server=True, context='restart') api.finalize() syslog.syslog(syslog.LOG_NOTICE, "certmonger restarted dirsrv instance '%s'" % instance) diff --git a/install/restart_scripts/stop_pkicad b/install/restart_scripts/stop_pkicad index 30b99eeff..ae07dcd58 100644 --- a/install/restart_scripts/stop_pkicad +++ b/install/restart_scripts/stop_pkicad @@ -27,7 +27,7 @@ from ipaserver.install import certs def main(): - api.bootstrap(context='restart') + api.bootstrap(in_server=True, context='restart') api.finalize() dogtag_service = services.knownservices['pki_tomcatd']