Change-Id: Id3913e75679127586d9a38941b918c40d7979b81
Signed-off-by: Hyeongsik Min <hyeongsik.min@samsung.com>
install -m 0644 %SOURCE2 %{buildroot}%{_unitdir}/peripheral-bus.service
%install_service multi-user.target.wants peripheral-bus.service
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
+%post
+systemctl daemon-reload
+if [ $1 == 1 ]; then
+ # install
+ systemctl start %{name}.service
+elif [ $1 == 2 ]; then
+ # upgrade
+ systemctl restart %{name}.service
+fi
+
+%preun
+if [ $1 == 0 ]; then
+ # uninstall
+ systemctl stop %{name}.service
+fi
+
+%postun
+systemctl daemon-reload
%files
%manifest %{name}.manifest