From b862dab1264960df42c7f4ebef49ef78d9a3b907 Mon Sep 17 00:00:00 2001 From: Michal Hlavinka Date: Aug 21 2012 17:24:56 +0000 Subject: use new systemd rpm macros (#850079) --- diff --git a/cyrus-imapd.spec b/cyrus-imapd.spec index 4e06434..cc4e30b 100644 --- a/cyrus-imapd.spec +++ b/cyrus-imapd.spec @@ -1,6 +1,6 @@ Name: cyrus-imapd Version: 2.4.16 -Release: 1%{?dist} +Release: 2%{?dist} %define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem @@ -323,7 +323,6 @@ rm -rf %{buildroot} -G saslauth -s /sbin/nologin -u %{uid} -r %{_cyrususer} 2> /dev/null || : %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 @@ -354,22 +353,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,-) @@ -509,6 +499,9 @@ fi %{_mandir}/man1/* %changelog +* Tue Aug 21 2012 Michal Hlavinka - 2.4.16-2 +- use new systemd rpm macros (#850079) + * Fri May 11 2012 Michal Hlavinka - 2.4.16-1 - updated to 2.4.16