From: Hyuk Lee Date: Wed, 21 Feb 2018 00:20:48 +0000 (+0900) Subject: Add the service file for bt-core X-Git-Tag: accepted/tizen/unified/20180226.142340^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66eacf6ffedf5b49caa681cd162a796858f8ec18;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Add the service file for bt-core Change-Id: I8d7af5e04ad558579a6b434bf7c8d68fccda584f Signed-off-by: Hyuk Lee --- diff --git a/bt-core/CMakeLists.txt b/bt-core/CMakeLists.txt index fa24aa7..c6ac939 100644 --- a/bt-core/CMakeLists.txt +++ b/bt-core/CMakeLists.txt @@ -58,5 +58,6 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.projectx.bt_core.service DESTINATION share/dbus-1/system-services) +INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-core.service DESTINATION /usr/lib/systemd/system) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/bluetooth-frwk-core.conf DESTINATION /etc/dbus-1/system.d) diff --git a/bt-core/bluetooth-frwk-core.service b/bt-core/bluetooth-frwk-core.service new file mode 100644 index 0000000..a66ef52 --- /dev/null +++ b/bt-core/bluetooth-frwk-core.service @@ -0,0 +1,16 @@ +[Unit] +Description=Bluetooth framework Core +After=multi-user.target + +[Service] +User=network_fw +Group=network_fw +SmackProcessLabel=System +SupplementaryGroups=priv_mediastorage priv_externalstorage dialout +Type=dbus +BusName=org.projectx.bt_core +ExecStart=/usr/bin/bt-core +KillMode=process + +[Install] +WantedBy=multi-user.target diff --git a/bt-core/org.projectx.bt_core.service b/bt-core/org.projectx.bt_core.service index 451fab3..63e673b 100644 --- a/bt-core/org.projectx.bt_core.service +++ b/bt-core/org.projectx.bt_core.service @@ -1,5 +1,5 @@ [D-BUS Service] Name=org.projectx.bt_core -Exec=/usr/bin/bt-core -User=network_fw -Group=network_fw +Exec=/bin/false +User=root +SystemdService=bluetooth-frwk-core.service diff --git a/packaging/bluetooth-frwk.spec b/packaging/bluetooth-frwk.spec index d94404f..b3b7c9c 100644 --- a/packaging/bluetooth-frwk.spec +++ b/packaging/bluetooth-frwk.spec @@ -366,9 +366,19 @@ install -m 0644 packaging/bluetooth-frwk-tv.service %{buildroot}%{_unitdir}/blue # common install -m 0644 packaging/bluetooth-frwk-common.service %{buildroot}%{_unitdir}/bluetooth-frwk.service.common +# bt-core +install -m 0644 bt-core/bluetooth-frwk-core.service %{buildroot}%{_unitdir}/bluetooth-frwk-core.service + + ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/multi-user.target.wants/bluetooth-frwk.service ln -s ../bluetooth-frwk.service %{buildroot}%{_unitdir}/starter.target.wants/bluetooth-frwk.service +%post core +mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d +ln -sf %{_libdir}/systemd/system/bluetooth-frwk-core.service %{_libdir}/systemd/system/multi-user.target.wants/bluetooth-frwk-core.service +ln -sf %{_libdir}/systemd/system/bluetooth-frwk-core.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ + + %postun -p /sbin/ldconfig %post service @@ -444,6 +454,7 @@ popd %manifest %{name}.manifest %license LICENSE %defattr(-, root, root) +%{_unitdir}/bluetooth-frwk-core.service %{_datadir}/dbus-1/system-services/org.projectx.bt_core.service %{_bindir}/bt-core %{_sysconfdir}/dbus-1/system.d/bluetooth-frwk-core.conf