From 71a34c37f8429f858672aa22f38473e9707e835c Mon Sep 17 00:00:00 2001 From: Krzysztof Jackiewicz Date: Mon, 24 Apr 2017 16:27:27 +0200 Subject: [PATCH] Manage ode service during installation/uninstallation Change-Id: I36b352d1095ad74f16ded4476a2604b53441a07f --- packaging/ode.spec | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packaging/ode.spec b/packaging/ode.spec index 2ff68c3..3a65e8a 100755 --- a/packaging/ode.spec +++ b/packaging/ode.spec @@ -61,6 +61,22 @@ ln -s ../ode.service %{buildroot}/%{_unitdir}/multi-user.target.wants/ode.servic %clean rm -rf %{buildroot} +%post +systemctl daemon-reload +if [ $1 = 1 ]; then + # installation + systemctl start ode.service +elif [ $1 = 2 ]; then + # update + systemctl restart ode.service +fi + +%preun +if [ $1 = 0 ]; then + # unistall + systemctl stop ode.service +fi + %postun ## ODE Client Package ######################################################## -- 2.7.4