From: Krzysztof Jackiewicz Date: Mon, 24 Apr 2017 14:27:27 +0000 (+0200) Subject: Manage ode service during installation/uninstallation X-Git-Tag: submit/tizen/20170522.121243~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71a34c37f8429f858672aa22f38473e9707e835c;p=platform%2Fcore%2Fsecurity%2Fode.git Manage ode service during installation/uninstallation Change-Id: I36b352d1095ad74f16ded4476a2604b53441a07f --- 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 ########################################################