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 <jcholast@redhat.com>
This commit is contained in:
Fraser Tweedale 2016-06-17 14:18:05 +10:00 committed by Jan Cholasta
parent fe689e9938
commit 3edf13cd8a
4 changed files with 4 additions and 4 deletions

View File

@ -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']

View File

@ -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-")

View File

@ -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)

View File

@ -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']