diff options
| author | Tomas Krizek <tkrizek@redhat.com> | 2016-11-09 09:52:28 +0100 |
|---|---|---|
| committer | Martin Basti <mbasti@redhat.com> | 2016-11-09 15:32:45 +0100 |
| commit | 33f7b8dc32bc95e0db067ac4df49807ee2b5120e (patch) | |
| tree | e1f618c363c372f46b35f39523a7e23967354e98 /install/restart_scripts/renew_ra_cert | |
| parent | c0674e89d1e6b5abd82cf3b7bf8054eec0fa6418 (diff) | |
| download | freeipa-33f7b8dc32bc95e0db067ac4df49807ee2b5120e.tar.gz freeipa-33f7b8dc32bc95e0db067ac4df49807ee2b5120e.tar.xz freeipa-33f7b8dc32bc95e0db067ac4df49807ee2b5120e.zip | |
libexec scripts: ldap conn management
Certificate renewal scripts require connection to LDAP. Properly
handle connects and disconnects from LDAP.
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
Diffstat (limited to 'install/restart_scripts/renew_ra_cert')
| -rw-r--r-- | install/restart_scripts/renew_ra_cert | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/install/restart_scripts/renew_ra_cert b/install/restart_scripts/renew_ra_cert index 62c5aa62c..d71d6e2ac 100644 --- a/install/restart_scripts/renew_ra_cert +++ b/install/restart_scripts/renew_ra_cert @@ -39,6 +39,7 @@ def _main(): api.bootstrap(in_server=True, context='restart') api.finalize() + api.Backend.ldap2.connect() tmpdir = tempfile.mkdtemp(prefix="tmp-") try: @@ -65,6 +66,7 @@ def _main(): krainstance.export_kra_agent_pem() finally: shutil.rmtree(tmpdir) + api.Backend.ldap2.disconnect() # Now restart Apache so the new certificate is available syslog.syslog(syslog.LOG_NOTICE, "Restarting httpd") |
