Use macros and don't call systemctl directly
- Resolves: rhbz#850328 - Introduce new systemd-rpm macros in sssd spec file
This commit is contained in:
parent
9f85549912
commit
94f4c4dd6d
17
sssd.spec
17
sssd.spec
@ -948,24 +948,13 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/pkgconfig/wbclient_sssd.pc
|
||||
|
||||
%post common
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_post sssd.service
|
||||
|
||||
%preun common
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable sssd.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop sssd.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_preun sssd.service
|
||||
|
||||
%postun common
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart sssd.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%systemd_postun_with_restart sssd.service
|
||||
|
||||
%if (0%{?with_cifs_utils_plugin} == 1)
|
||||
%post client
|
||||
|
Loading…
Reference in New Issue
Block a user