diff --git a/rabbitmq-server.spec b/rabbitmq-server.spec index 1f8a2b4..21786cc 100644 --- a/rabbitmq-server.spec +++ b/rabbitmq-server.spec @@ -3,7 +3,7 @@ Name: rabbitmq-server Version: 3.5.4 -Release: 2%{?dist} +Release: 3%{?dist} License: MPLv1.1 Group: Development/Libraries Source: http://www.rabbitmq.com/releases/rabbitmq-server/v%{version}/%{name}-%{version}.tar.gz @@ -124,15 +124,6 @@ rm -rf %{buildroot}%{_rabbit_erllibdir}/LICENSE-* %pre -if [ $1 -gt 1 ]; then - # Upgrade - stop previous instance of rabbitmq-server -%if 0%{?el5}%{?el6} - /sbin/service rabbitmq-server stop -%else - systemctl stop %{name}.service -%endif -fi - # create rabbitmq group if ! getent group rabbitmq >/dev/null; then groupadd -r rabbitmq @@ -149,6 +140,7 @@ fi /sbin/chkconfig --add %{name} %else %systemd_post %{name}.service +/bin/systemctl daemon-reload %endif %preun @@ -170,6 +162,15 @@ for ext in rel script boot ; do rm -f %{_rabbit_erllibdir}/ebin/rabbit.$ext done +%postun +%if 0%{?el5}%{?el6} +if [ $1 -gt 1 ]; then + /sbin/service %{name} try-restart +fi +%else +%systemd_postun_with_restart %{name}.service +%endif + %if 0%{?fedora} > 17 || 0%{?rhel} >= 7 %triggerun -- %{name} < 2.8.4 # Save the current service runlevel info @@ -204,6 +205,9 @@ done rm -rf %{buildroot} %changelog +* Thu Sep 3 2015 John Eckersberg - 3.5.4-3 +- Fix service restart on package upgrade (RHBZ#1259564) + * Fri Aug 7 2015 John Eckersberg - 3.5.4-2 - Update logrotate config to use rabbitmqctl rotate_logs (rhbz#1148444)