summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/sssd.spec.in17
1 files changed, 3 insertions, 14 deletions
diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index 76066de9a..354431336 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -1003,24 +1003,13 @@ getent passwd sssd >/dev/null || useradd -r -g sssd -d / -s /sbin/nologin -c "Us
%if (0%{?use_systemd} == 1)
# systemd
%post common
-if [ $1 -eq 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
%else
# sysv