summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-31 08:50:50 +0100
committerMartin Kosek <mkosek@redhat.com>2012-10-31 08:53:25 +0100
commit6b7e5ec71ad9c6cf852e05086f45f8147c7c066c (patch)
treeb3444cc1e6292b935de3438af395f1f3795484ae
parent63ae7a29d8389f8a6fb2e7cee4fa32f5df191f6e (diff)
downloadfreeipa.git-6b7e5ec71ad9c6cf852e05086f45f8147c7c066c.tar.gz
freeipa.git-6b7e5ec71ad9c6cf852e05086f45f8147c7c066c.tar.xz
freeipa.git-6b7e5ec71ad9c6cf852e05086f45f8147c7c066c.zip
Restart httpd if ipa-server-trust-ad is installed or updated
If ipa-server-trust-ad is installed after the ipa server is installed and configured, httpd needs a restart for additional python modules to be loaded into httpd on IPA initialization. Fixes https://fedorahosted.org/freeipa/ticket/3185
-rw-r--r--freeipa.spec.in14
1 files changed, 14 insertions, 0 deletions
diff --git a/freeipa.spec.in b/freeipa.spec.in
index a4efd9c3..a2661393 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -238,6 +238,7 @@ Requires: libsss_idmap
# IPA AD trusts cannot be used at the same time with the locator plugin
# since Winbindd will be configured in a different mode
Requires(post): %{_sbindir}/update-alternatives
+Requires(post): python
Requires(postun): %{_sbindir}/update-alternatives
Requires(preun): %{_sbindir}/update-alternatives
@@ -592,6 +593,16 @@ fi
%post server-trust-ad
%{_sbindir}/update-alternatives --install %{_libdir}/krb5/plugins/libkrb5/winbind_krb5_locator.so \
winbind_krb5_locator.so /dev/null 90
+python -c "import sys; from ipaserver.install import installutils; sys.exit(0 if installutils.is_ipa_configured() else 1);" > /dev/null 2>&1
+if [ $? -eq 0 ]; then
+%if 0%{?fedora} >= 16
+# Use systemd scheme
+ /bin/systemctl try-restart httpd.service >/dev/null 2>&1 || :
+%else
+# Use SystemV scheme only before F16
+ /sbin/service httpd condrestart >/dev/null 2>&1 || :
+%endif
+fi
%preun server-trust-ad
if [ $1 -eq 0 ]; then
@@ -816,6 +827,9 @@ fi
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/ca.crt
%changelog
+* Fri Oct 26 2012 Sumit Bose <sbose@redhat.com> - 3.0.0-2
+- Restart httpd in post install of server-trust-ad
+
* Wed Oct 24 2012 Martin Kosek <mkosek@redhat.com> - 3.0.0-1
- Add strict Requires for 389-ds-base and policycoreutils to avoid user
removing them during package lifetime