From 550720e393da311b30311f13c7f04c168530e974 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 19 Nov 2019 16:08:49 +0900 Subject: [PATCH] Fix HCI logger service's option to launch btmon Change-Id: Ia30c69f6a5cd1405dbbd1a30cfa517aee790755a Signed-off-by: DoHyun Pyun --- packaging/bluetooth-hci-logger-stop.service | 14 -------------- packaging/bluetooth-hci-logger.service | 4 ++-- scripts/mobile/bt-stack-down.sh | 2 +- scripts/mobile/bt-stack-up.sh | 2 +- scripts/wearable/bt-stack-down.sh | 2 +- 5 files changed, 5 insertions(+), 19 deletions(-) delete mode 100644 packaging/bluetooth-hci-logger-stop.service mode change 100755 => 100644 scripts/wearable/bt-stack-down.sh diff --git a/packaging/bluetooth-hci-logger-stop.service b/packaging/bluetooth-hci-logger-stop.service deleted file mode 100644 index a88aacc..0000000 --- a/packaging/bluetooth-hci-logger-stop.service +++ /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 diff --git a/packaging/bluetooth-hci-logger.service b/packaging/bluetooth-hci-logger.service index 8f0483d..45974e2 100644 --- a/packaging/bluetooth-hci-logger.service +++ b/packaging/bluetooth-hci-logger.service @@ -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 diff --git a/scripts/mobile/bt-stack-down.sh b/scripts/mobile/bt-stack-down.sh index 0ff09a6..98ff244 100644 --- a/scripts/mobile/bt-stack-down.sh +++ b/scripts/mobile/bt-stack-down.sh @@ -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 diff --git a/scripts/mobile/bt-stack-up.sh b/scripts/mobile/bt-stack-up.sh index ddbf664..6e73382 100644 --- a/scripts/mobile/bt-stack-up.sh +++ b/scripts/mobile/bt-stack-up.sh @@ -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 diff --git a/scripts/wearable/bt-stack-down.sh b/scripts/wearable/bt-stack-down.sh old mode 100755 new mode 100644 index c2e0b75..6e2a9a7 --- a/scripts/wearable/bt-stack-down.sh +++ b/scripts/wearable/bt-stack-down.sh @@ -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 -- 2.7.4