mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-16 18:35:01 -06:00
Handle add/removing and stopping restarting daemons in update/remove
This commit is contained in:
parent
18992de657
commit
87bc5c4d63
@ -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,-)
|
||||
|
@ -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,-)
|
||||
|
Loading…
Reference in New Issue
Block a user