-# ugly hack if init script got removed during %postun by upgraded (buggy/2.1) package
-%if "%{_vendor}" == "redhat" || "%{_vendor}" == "amazon"
-if [ -f %{_sysconfdir}/sysconfig/shibd ] ; then
- if [ ! -f %{_initrddir}/shibd ] ; then
- if [ -f %{_sysconfdir}/shibboleth/shibd-%{_vendor} ] ; then
- %{__cp} -p %{_sysconfdir}/shibboleth/shibd-%{_vendor} %{_initrddir}/shibd
- %{__chmod} 755 %{_initrddir}/shibd
- /sbin/chkconfig --add shibd
- fi
-fi
+# One-time extra restart of shibd and Apache to work around
+# SUSE bug that breaks old %restart_on_update macro.
+# If we remove, upgrades from pre-systemd to post-systemd
+# will stop doing the final restart.
+%if "%{_vendor}" == "suse" && 0%{?suse_version} >= 1210
+ /usr/bin/systemctl try-restart shibd >/dev/null 2>&1 || :
+ /usr/bin/systemctl try-restart apache2 >/dev/null 2>&1 || :