Fix HCI logger service's option to launch btmon 65/218065/2
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 19 Nov 2019 07:08:49 +0000 (16:08 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Wed, 20 Nov 2019 07:49:22 +0000 (16:49 +0900)
Change-Id: Ia30c69f6a5cd1405dbbd1a30cfa517aee790755a
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
packaging/bluetooth-hci-logger-stop.service [deleted file]
packaging/bluetooth-hci-logger.service
scripts/mobile/bt-stack-down.sh
scripts/mobile/bt-stack-up.sh
scripts/wearable/bt-stack-down.sh [changed mode: 0755->0644]

diff --git a/packaging/bluetooth-hci-logger-stop.service b/packaging/bluetooth-hci-logger-stop.service
deleted file mode 100644 (file)
index a88aacc..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-[Unit]
-Description=Service to stop BT HCI logger normally
-
-[Service]
-User=network_fw
-Group=network_fw
-Type=oneshot
-SmackProcessLabel=System
-ExecStartPre=/usr/bin/rm -f /run/.hci_logger_stop
-ExecStart=/usr/etc/bluetooth/bt-run-hci-logger.sh normal stop
-StandardOutput=journal+console
-SuccessExitStatus=1
-StartLimitInterval=1
-StartLimitBurst=10
index 8f0483d..45974e2 100644 (file)
@@ -4,10 +4,10 @@ Description=Service to run BT HCI logger normally
 [Service]
 User=network_fw
 Group=network_fw
-Type=oneshot
+Type=forking
 SmackProcessLabel=System
-ExecStartPre=/usr/bin/rm -f /run/.hci_logger_start
 ExecStart=/usr/etc/bluetooth/bt-run-hci-logger.sh normal start btmon
+PIDFile=/tmp/.bt_hci_logger.pid
 StandardOutput=journal+console
 SuccessExitStatus=1
 StartLimitInterval=1
index 0ff09a6..98ff244 100644 (file)
@@ -10,7 +10,7 @@ PGREP=/usr/bin/pgrep
 /usr/etc/bluetooth/bt-dev-end.sh
 
 # Stop HCI logging
-/usr/bin/touch /run/.hci_logger_stop
+systemctl stop bluetooth-hci-logger.service
 
 # Kill BlueZ bluetooth stack
 
index ddbf664..6e73382 100644 (file)
@@ -10,7 +10,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 if !(/usr/bin/hciconfig | grep hci); then
        echo "Registering BT device is failed."
-       /usr/bin/touch /run/.hci_logger_stop
+       systemctl stop bluetooth-hci-logger.service
        exit 1
 fi
 
old mode 100755 (executable)
new mode 100644 (file)
index c2e0b75..6e2a9a7
@@ -10,7 +10,7 @@ PGREP=/usr/bin/pgrep
 /usr/etc/bluetooth/bt-dev-end.sh
 
 # Stop HCI logging
-/usr/bin/touch /run/.hci_logger_stop
+systemctl stop bluetooth-hci-logger.service
 
 # Kill BlueZ bluetooth stack