diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 4de930c..6188683 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -1,6 +1,6 @@ Name: cyrus-imapd Version: 2.4.16 -Release: 3%{?dist} +Release: 4%{?dist} %define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem @@ -293,7 +293,6 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d %{ -G saslauth -s /sbin/nologin -u %{uid} -r %{_cyrususer} %post -/bin/systemctl daemon-reload > /dev/null 2>&1 : # Force synchronous updates, usually only on ext2 filesystems for i in %{_var}/lib/imap/{user,quota} %{_var}/spool/imap @@ -324,22 +323,13 @@ mv %{name}.pem %{ssl_pem_file} popd fi +%systemd_post cyrus-imapd.service + %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl disable cyrus-imapd.service >/dev/null 2>&1 || : - /bin/systemctl stop cyrus-imapd.service > /dev/null 2>&1 || : -fi +%systemd_preun cyrus-imapd.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart cyrus-imapd.service >/dev/null 2>&1 || : -fi - -%triggerun -- cyrus-imapd < 2.4.7-2 -/sbin/chkconfig --level 3 cyrus-imapd && /bin/systemctl enable cyrus-imapd.service >/dev/null 2>&1 || : +%systemd_postun_with_restart cyrus-imapd.service %files %defattr(-,root,root,-) @@ -478,6 +468,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Aug 21 2012 Michal Hlavinka - 2.4.16-4 +- use new systemd rpm macros (#850079) + * Wed Jul 18 2012 Fedora Release Engineering - 2.4.16-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild