[cyrus-imapd/f18] use new systemd rpm macros (#850079)
Michal Hlavinka
mhlavink at fedoraproject.org
Tue Aug 21 17:42:07 UTC 2012
commit 768d89acae0c536c0fffdae001a68b866250ddc6
Author: Michal Hlavinka <mhlavink at redhat.com>
Date: Tue Aug 21 19:41:41 2012 +0200
use new systemd rpm macros (#850079)
cyrus-imapd.spec | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
---
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 <mhlavink at redhat.com> - 2.4.16-4
+- use new systemd rpm macros (#850079)
+
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.4.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
More information about the scm-commits
mailing list