change dbus service to systemd service 18/217618/2 accepted/tizen/unified/20191119.083833 submit/tizen/20191114.134136
authorJihoon Jung <jh8801.jung@samsung.com>
Wed, 13 Nov 2019 13:38:36 +0000 (22:38 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Wed, 13 Nov 2019 19:25:19 +0000 (04:25 +0900)
Change-Id: I2fffa8777e16f2930efff2d0c9167ba6a03a99fa
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
packaging/smartcard-service.service [new file with mode: 0644]
packaging/smartcard-service.spec
server/org.tizen.SmartcardService.service

diff --git a/packaging/smartcard-service.service b/packaging/smartcard-service.service
new file mode 100644 (file)
index 0000000..d205d27
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=Smartcard service daemon
+
+[Service]
+Type=dbus
+BusName=org.tizen.SmartcardService
+ExecStart=/usr/bin/smartcard-daemon
+User=network_fw
+Group=network_fw
+SmackProcessLabel=System
index ab1a2e2acd6d4a40053eaec253bf35c90192c604..d996701487411b53087d696d0b48f9bee9b945db 100755 (executable)
@@ -5,6 +5,7 @@ Release:    0
 Group:      Network & Connectivity
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Source1:    smartcard-service.service
 BuildRequires: cmake
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(gio-unix-2.0)
@@ -66,6 +67,9 @@ export LDFLAGS+=" -lgcov "
 %install
 %make_install
 
+mkdir -p %{buildroot}/usr/lib/systemd/system/
+cp -af %{SOURCE1} %{buildroot}/usr/lib/systemd/system/
+
 mkdir -p %{buildroot}/etc/dbus-1/system.d/
 cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf %{buildroot}/etc/dbus-1/system.d/
 
@@ -75,6 +79,7 @@ cp -af %{_builddir}/%{name}-%{version}/packaging/org.tizen.SmartcardService.conf
 %{_bindir}/smartcard-daemon
 %{_sysconfdir}/dbus-1/system.d/org.tizen.SmartcardService.conf
 %{_datadir}/dbus-1/system-services/org.tizen.SmartcardService.service
+/usr/lib/systemd/system/%{name}.service
 %if 0%{?gtests:1}
 %{_bindir}/gtest*
 %endif
index 0b8873004ebe77621e7332c600572ae39ed33fa5..c54d7fe5f2ec6e59952f3c8b7507abeec358016c 100644 (file)
@@ -1,4 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.SmartcardService
-Exec=/usr/bin/smartcard-daemon
-User=network_fw
+Exec=/bin/false
+SystemdService=smartcard-service.service