Scriptlets replaced with new systemd macros (#850143)

This commit is contained in:
Robin Lee 2012-10-12 14:49:05 +08:00
parent e367df646b
commit 4c57edc83e

View File

@ -6,7 +6,7 @@
Name: haproxy Name: haproxy
Version: 1.4.20 Version: 1.4.20
Release: 2%{?dist} Release: 3%{?dist}
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
Group: System Environment/Daemons Group: System Environment/Daemons
@ -24,9 +24,9 @@ BuildRequires: systemd-units
Requires(pre): shadow-utils Requires(pre): shadow-utils
Requires(post): systemd-units Requires(post): systemd
Requires(preun): systemd-units Requires(preun): systemd
Requires(postun): systemd-units Requires(postun): systemd
%description %description
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
@ -110,24 +110,14 @@ exit 0
%post %post
if [ $1 -eq 1 ]; then %systemd_post %{name}.service
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
%preun %preun
if [ $1 -eq 0 ]; then %systemd_preun %{name}.service
# Package removal, not upgrade
/bin/systemctl --no-reload disable %{name}.service > /dev/null 2>&1 || :
/bin/systemctl stop %{name}.service > /dev/null 2>&1 || :
fi
%postun %postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || : %systemd_postun_with_restart %{name}.service
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || :
fi
%files %files
@ -153,6 +143,9 @@ fi
%changelog %changelog
* Mon Sep 17 2012 Václav Pavlín <vpavlin@redhat.com> - 1.4.20-3
- Scriptlets replaced with new systemd macros (#850143)
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.20-2 * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild