Fix HCI logger service's option to launch btmon
[platform/core/connectivity/bluetooth-tools.git] / scripts / mobile / bt-stack-down.sh
old mode 100755 (executable)
new mode 100644 (file)
index 4771cd3..98ff244
@@ -1,5 +1,6 @@
 #!/bin/sh
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
+PGREP=/usr/bin/pgrep
 
 #
 # Script for stopping Bluetooth stack
@@ -8,15 +9,20 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 # Remove BT device
 /usr/etc/bluetooth/bt-dev-end.sh
 
+# Stop HCI logging
+systemctl stop bluetooth-hci-logger.service
+
 # Kill BlueZ bluetooth stack
-killall obexd obex-client
-killall bt-syspopup
-killall bluetooth-pb-agent
-killall bluetooth-map-agent
-killall bluetooth-hfp-agent
-killall bluetooth-ag-agent
-killall bluetoothd
-killall bluetooth-share
+
+pkill --full obexd
+pkill --full obexd-client
+pkill --full bt-syspopup
+pkill --full bluetooth-share
+pkill --full bluetooth-pb-agent
+pkill --full bluetooth-map-agent
+pkill --full bluetooth-hfp-agent
+pkill --full bluetooth-ag-agent
+pkill --full bluetoothd
 
 # result
 exit 0