diff --git a/sssd.spec b/sssd.spec index 11326b7..e4b7be0 100644 --- a/sssd.spec +++ b/sssd.spec @@ -397,8 +397,6 @@ rm -Rf "$b/%_sysconfdir/dbus-1" "$b/%_datadir/dbus-1" %if 0%{?_unitdir:1} %service_add_post sssd.service %endif -# Clear caches, which may have an incompatible format after (especially) downgrade -rm -f /var/lib/sss/db/*.ldb %if 0%{?_unitdir:1} %preun @@ -411,8 +409,15 @@ if [ "$1" == "0" ]; then fi; /sbin/ldconfig %if 0%{?_unitdir:1} +# Clear caches, which may have an incompatible format afterwards +# (especially, downgrades) +rm -f /var/lib/sss/db/*.ldb +# del_postun includes a try-restart %service_del_postun sssd.service +%else +%restart_on_update sssd %endif +%insserv_cleanup %post -n libipa_hbac0 -p /sbin/ldconfig %postun -n libipa_hbac0 -p /sbin/ldconfig