summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-26 13:12:17 +0200
committerMartin Kosek <mkosek@redhat.com>2012-10-31 08:48:25 +0100
commitfe66fbe637132ac5eb22eea388e2261f33497bf5 (patch)
tree244597534bf3681a087c2104b66127c87a52ef51
parent2d3e91ff1cefc29f521991cf930fcf09bcdf78e8 (diff)
downloadfreeipa-fe66fbe637132ac5eb22eea388e2261f33497bf5.tar.gz
freeipa-fe66fbe637132ac5eb22eea388e2261f33497bf5.tar.xz
freeipa-fe66fbe637132ac5eb22eea388e2261f33497bf5.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 af76118fd..584577057 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.99-2
+- Restart httpd in post install of server-trust-ad
+
* Wed Oct 24 2012 Martin Kosek <mkosek@redhat.com> - 3.0.99-1
- Add strict Requires for 389-ds-base and policycoreutils to avoid user
removing them during package lifetime