summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-server.spec.in
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2007-12-12 13:58:55 -0500
committerSimo Sorce <ssorce@redhat.com>2007-12-12 13:58:55 -0500
commit87bc5c4d6394ce2b0f0a5e18bcff5721b34ebdc1 (patch)
tree9120e61c2af2a0a49b5195b1ae7fb1bdb3d3036f /ipa-server/ipa-server.spec.in
parent18992de6577e614f59e43fec77d437fe80a63c4b (diff)
downloadfreeipa-87bc5c4d6394ce2b0f0a5e18bcff5721b34ebdc1.tar.gz
freeipa-87bc5c4d6394ce2b0f0a5e18bcff5721b34ebdc1.tar.xz
freeipa-87bc5c4d6394ce2b0f0a5e18bcff5721b34ebdc1.zip
Handle add/removing and stopping restarting daemons in update/remove
Diffstat (limited to 'ipa-server/ipa-server.spec.in')
-rw-r--r--ipa-server/ipa-server.spec.in19
1 files changed, 19 insertions, 0 deletions
diff --git a/ipa-server/ipa-server.spec.in b/ipa-server/ipa-server.spec.in
index 874d82cfd..21f46556a 100644
--- a/ipa-server/ipa-server.spec.in
+++ b/ipa-server/ipa-server.spec.in
@@ -69,6 +69,25 @@ rm %{buildroot}/%{plugin_dir}/libipa-dna-plugin.la
%clean
rm -rf %{buildroot}
+%post
+if [ $1 = 1 ]; then
+ /sbin/chkconfig --add ipa-kpasswd
+ /sbin/chkconfig --add ipa-webgui
+fi
+
+%preun
+if [ $1 = 0 ]; then
+ /sbin/chkconfig --del ipa-kpasswd
+ /sbin/chkconfig --del ipa-webgui
+ /sbin/service ipa-kpasswd stop >/dev/null 2>&1 || :
+ /sbin/service ipa-webgui stop >/dev/null 2>&1 || :
+fi
+
+%postun
+if [ "$1" -ge "1" ]; then
+ /sbin/service ipa-kpasswd condrestart >/dev/null 2>&1 || :
+ /sbin/service ipa-webgui condrestart >/dev/null 2>&1 || :
+fi
%files
%defattr(-,root,root,-)