Commit e952ffa29d44698f5288e5b39c4ca0785649a52c

Authored by Sergio Oliveira
Committed by Lucas Kanashiro
1 parent 3d51ad58
Exists in stable-4.x

Restart service if running

(cherry picked from commit b8b29589c82e0cc31014d512d48eca6c9d77fecc)
Showing 1 changed file with 6 additions and 1 deletions   Show diff stats
src/pkg-rpm/mailman-api/mailman-api.spec
... ... @@ -14,7 +14,7 @@ BuildArch: noarch
14 14 Vendor: Sergio Oliveira <sergio@tracy.com.br>
15 15 Requires: mailman, python >= 2.7, python-gunicorn >= 18.0, bottle >= 0.11.6
16 16 Url: http://pypi.python.org/pypi/mailman-api/
17   -Release: 10
  17 +Release: 11
18 18 BuildRequires: python >= 2.7, python-devel >= 2.7, python-setuptools >= 0.9.8
19 19 BuildRequires: systemd-units
20 20  
... ... @@ -67,6 +67,11 @@ cp init/systemd/%{name}.service $RPM_BUILD_ROOT%{_unitdir}
67 67 %post
68 68 %service_add_post mailman-api.service
69 69  
  70 +if [ $1 -gt 1 ]; then
  71 + # upgrade; restart if running
  72 + systemctl try-restart mailman-api
  73 +fi
  74 +
70 75 %preun
71 76 %systemd_preun mailman-api.service
72 77  
... ...