use new systemd rpm macros (#850079)

This commit is contained in:
Michal Hlavinka 2012-08-21 19:26:46 +02:00
parent 15fff38376
commit 0cb4bd9eb8

View File

@ -1,6 +1,6 @@
Name: cyrus-imapd Name: cyrus-imapd
Version: 2.4.16 Version: 2.4.16
Release: 3%{?dist} Release: 4%{?dist}
%define ssl_pem_file %{_sysconfdir}/pki/%{name}/%{name}.pem %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} -G saslauth -s /sbin/nologin -u %{uid} -r %{_cyrususer}
%post %post
/bin/systemctl daemon-reload > /dev/null 2>&1 :
# Force synchronous updates, usually only on ext2 filesystems # Force synchronous updates, usually only on ext2 filesystems
for i in %{_var}/lib/imap/{user,quota} %{_var}/spool/imap for i in %{_var}/lib/imap/{user,quota} %{_var}/spool/imap
@ -324,22 +323,13 @@ mv %{name}.pem %{ssl_pem_file}
popd popd
fi fi
%systemd_post cyrus-imapd.service
%preun %preun
if [ $1 -eq 0 ] ; then %systemd_preun cyrus-imapd.service
# 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
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart cyrus-imapd.service
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 || :
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
@ -478,6 +468,9 @@ fi
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Tue Aug 21 2012 Michal Hlavinka <mhlavink@redhat.com> - 2.4.16-4
- use new systemd rpm macros (#850079)
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.16-3 * Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild