diff options
author | Martin Basti <mbasti@redhat.com> | 2016-03-16 09:04:42 +0100 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-04-22 10:19:25 +0200 |
commit | 586fee293f42388510fa5436af19460bbe1fdec5 (patch) | |
tree | 777c156e49f181ce566468c6d7283a6feac95cac /ipaserver/install/httpinstance.py | |
parent | 822186b2715f8a3ce2f48e873d7e1568d03f9f97 (diff) | |
download | freeipa-586fee293f42388510fa5436af19460bbe1fdec5.tar.gz freeipa-586fee293f42388510fa5436af19460bbe1fdec5.tar.xz freeipa-586fee293f42388510fa5436af19460bbe1fdec5.zip |
Configure httpd service from installer instead of directly from RPM
File httpd.service was created by RPM, what causes that httpd service may
fail due IPA specific configuration even if IPA wasn't installed or was
uninstalled (without erasing RPMs).
With this patch httpd service is configured by httpd.d/ipa.conf during
IPA installation and this config is removed by uninstaller, so no
residual http configuration related to IPA should stay there.
https://fedorahosted.org/freeipa/ticket/5681
Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaserver/install/httpinstance.py')
-rw-r--r-- | ipaserver/install/httpinstance.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index b0fbe6926..00f890175 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -225,6 +225,8 @@ class HTTPInstance(service.Service): [paths.KDESTROY, '-A'], runas=HTTPD_USER, raiseonerr=False, env={}) def __configure_http(self): + self.update_httpd_service_ipa_conf() + target_fname = paths.HTTPD_IPA_CONF http_txt = ipautil.template_file(ipautil.SHARE_DIR + "ipa.conf", self.sub_dict) self.fstore.backup_file(paths.HTTPD_IPA_CONF) @@ -479,6 +481,9 @@ class HTTPInstance(service.Service): except Exception as e: root_logger.critical("Unable to start oddjobd: {0}".format(str(e))) + def update_httpd_service_ipa_conf(self): + tasks.configure_httpd_service_ipa_conf() + def uninstall(self): if self.is_configured(): self.print_msg("Unconfiguring web server") @@ -533,6 +538,7 @@ class HTTPInstance(service.Service): installutils.remove_file(paths.HTTPD_IPA_PKI_PROXY_CONF) installutils.remove_file(paths.HTTPD_IPA_KDCPROXY_CONF_SYMLINK) installutils.remove_file(paths.HTTPD_IPA_KDCPROXY_CONF) + tasks.remove_httpd_service_ipa_conf() # Restore SELinux boolean states boolean_states = {name: self.restore_state(name) |