From: Sangki Park Date: Mon, 8 Jan 2018 09:53:31 +0000 (+0900) Subject: Use systemd service X-Git-Tag: accepted/tizen/4.0/unified/20190103.235212~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ad1a94e4c3f932d28abad1485a0184ef023c9fd9;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-agent.git Use systemd service Change-Id: I5d44f6cbddc2518f59c8204e98d0e7c4d9a40862 --- diff --git a/ag-agent/org.bluez.ag_agent.service b/ag-agent/org.bluez.ag_agent.service index f32a3a2..6f5210c 100644 --- a/ag-agent/org.bluez.ag_agent.service +++ b/ag-agent/org.bluez.ag_agent.service @@ -1,5 +1,4 @@ [D-BUS Service] Name=org.bluez.ag_agent -Exec=/usr/bin/bluetooth-ag-agent -User=network_fw -Group=network_fw +Exec=/usr/bin/false +SystemdService=bluetooth-ag-agent.service diff --git a/hf-agent/org.bluez.hf_agent.service b/hf-agent/org.bluez.hf_agent.service index f63552c..909f33b 100644 --- a/hf-agent/org.bluez.hf_agent.service +++ b/hf-agent/org.bluez.hf_agent.service @@ -1,4 +1,4 @@ [D-BUS Service] Name=org.bluez.hf_agent -Exec=/usr/bin/bluetooth-hf-agent -User=root +Exec=/usr/bin/false +SystemdService=bluetooth-hf-agent.service diff --git a/hid-agent/org.bluez.hid_agent.service b/hid-agent/org.bluez.hid_agent.service index e678c59..57e6ea0 100644 --- a/hid-agent/org.bluez.hid_agent.service +++ b/hid-agent/org.bluez.hid_agent.service @@ -1,5 +1,4 @@ [D-BUS Service] Name=org.bluez.hid_agent -Exec=/usr/bin/bluetooth-hid-agent -User=network_fw -Group=network_fw +Exec=/usr/bin/false +SystemdService=bluetooth-hid-agent.service diff --git a/packaging/bluetooth-ag-agent.service b/packaging/bluetooth-ag-agent.service new file mode 100644 index 0000000..f782923 --- /dev/null +++ b/packaging/bluetooth-ag-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth AG Agent + +[Service] +User=network_fw +Group=network_fw +SupplementaryGroups=system_share +Type=dbus +BusName=org.bluez.ag_agent +SmackProcessLabel=System +ExecStart=/usr/bin/bluetooth-ag-agent diff --git a/packaging/bluetooth-agent.spec b/packaging/bluetooth-agent.spec index 18a49ef..6bb61c1 100644 --- a/packaging/bluetooth-agent.spec +++ b/packaging/bluetooth-agent.spec @@ -144,12 +144,21 @@ execstack -c %{buildroot}%{_bindir}/bluetooth-map-agent #%endif install -D -m 0644 packaging/bluetooth-pbap-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-pbap-agent.service execstack -c %{buildroot}%{_bindir}/bluetooth-pb-agent +install -D -m 0644 packaging/bluetooth-hf-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hf-agent.service +execstack -c %{buildroot}%{_bindir}/bluetooth-hf-agent +install -D -m 0644 packaging/bluetooth-ag-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-ag-agent.service +execstack -c %{buildroot}%{_bindir}/bluetooth-ag-agent +install -D -m 0644 packaging/bluetooth-hid-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-hid-agent.service +execstack -c %{buildroot}%{_bindir}/bluetooth-hid-agent %post %if 0%{?sec_product_feature_bt_map_server_enable} ln -sf %{_libdir}/systemd/user/bluetooth-map-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ %endif ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ +ln -sf %{_libdir}/systemd/system/bluetooth-ag-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ +ln -sf %{_libdir}/systemd/system/bluetooth-hf-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ +ln -sf %{_libdir}/systemd/system/bluetooth-hid-agent.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/ %files %manifest %{name}.manifest @@ -169,6 +178,9 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys %{_datadir}/dbus-1/system-services/org.bluez.hid_agent.service %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf %{_sysconfdir}/dbus-1/system.d/bluetooth-hf-agent.conf +%{_libdir}/systemd/system/bluetooth-hf-agent.service +%{_libdir}/systemd/system/bluetooth-ag-agent.service +%{_libdir}/systemd/system/bluetooth-hid-agent.service %exclude %{_libdir}/systemd/system/bluetooth-map-agent.service %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service %endif @@ -195,6 +207,7 @@ ln -sf %{_libdir}/systemd/system/bluetooth-pbap-agent.service %{_sysconfdir}/sys %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf %{_libdir}/systemd/system/bluetooth-map-agent.service %{_libdir}/systemd/system/bluetooth-pbap-agent.service +%{_libdir}/systemd/system/bluetooth-ag-agent.service %endif %files ipsp diff --git a/packaging/bluetooth-hf-agent.service b/packaging/bluetooth-hf-agent.service new file mode 100644 index 0000000..a258e39 --- /dev/null +++ b/packaging/bluetooth-hf-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth HF Agent + +[Service] +User=network_fw +Group=network_fw +SupplementaryGroups=system_share +Type=dbus +BusName=org.bluez.hf_agent +SmackProcessLabel=System +ExecStart=/usr/bin/bluetooth-hf-agent diff --git a/packaging/bluetooth-hid-agent.service b/packaging/bluetooth-hid-agent.service new file mode 100644 index 0000000..5e2afff --- /dev/null +++ b/packaging/bluetooth-hid-agent.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bluetooth HID Agent + +[Service] +User=network_fw +Group=network_fw +SupplementaryGroups=system_share +Type=dbus +BusName=org.bluez.hid_agent +SmackProcessLabel=System +ExecStart=/usr/bin/bluetooth-hid-agent diff --git a/packaging/bluetooth-pbap-agent.service b/packaging/bluetooth-pbap-agent.service index 60460c2..f937cfb 100644 --- a/packaging/bluetooth-pbap-agent.service +++ b/packaging/bluetooth-pbap-agent.service @@ -4,8 +4,8 @@ Description=Bluetooth PBAP Agent [Service] User=network_fw Group=network_fw -SmackProcessLabel=System -SupplementaryGroups=priv_message_read +SupplementaryGroups=system_share Type=dbus BusName=org.bluez.pb_agent +SmackProcessLabel=System ExecStart=/usr/bin/bluetooth-pb-agent