Fix HCI logger service's option to launch btmon
[platform/core/connectivity/bluetooth-tools.git] / scripts / mobile / bt-stack-up.sh
old mode 100755 (executable)
new mode 100644 (file)
index 0b4b302..6e73382
@@ -1,4 +1,5 @@
 #!/bin/sh
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 #
 # Script for executing Bluetooth stack
@@ -9,19 +10,8 @@
 
 if !(/usr/bin/hciconfig | grep hci); then
        echo "Registering BT device is failed."
+       systemctl stop bluetooth-hci-logger.service
        exit 1
 fi
 
-# We have to handle both systemd and sysvinit cases differently
-if [ -d /sys/fs/cgroup/systemd ]; then
-   # bt-service changes USER to 'app' via libprivilege-control, so it needs
-   # to know where the session bus is located under systemd
-   export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/app/dbus/user_bus_socket
-fi
-
-# Execute BlueZ BT stack
-echo "Run bluetoothd"
-/usr/lib/bluetooth/bluetoothd -d -C &
-/usr/bin/bluetooth-share &
-
 exit 0