From afce2a60578ec5e62e53c2a6cffa01661a0a75df Mon Sep 17 00:00:00 2001
From: Roman Tsisyk <roman@tsisyk.com>
Date: Wed, 1 Feb 2017 17:48:18 +0300
Subject: [PATCH] RPM: fix scriptlets to follow guidelines

* Don't start tarantool on install
* Don't restart tarantool on upgrade

Fix #2053
---
 rpm/tarantool.spec | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index da91158ccf..6d082584d2 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -147,15 +147,16 @@ cd test && ./test-run.py unit/ app/ app-tap/ box/ box-tap/ engine/ sophia/
 %systemd_post tarantool@.service
 %else
 chkconfig --add tarantool || :
-service tarantool start || :
 %endif
 
 %preun
 %if %{with systemd}
 %systemd_preun tarantool@.service
 %else
-service tarantool stop
-chkconfig --del tarantool
+if [ $1 -eq 0 ] ; then # uninstall
+    service tarantool stop || :
+    chkconfig --del tarantool || :
+fi
 %endif
 
 %postun
-- 
GitLab