2 PATH=/bin:/usr/bin:/sbin:/usr/sbin
5 # Script for executing Bluetooth stack
9 systemctl start bluetooth-hci-logger.service
12 /usr/etc/bluetooth/bt-dev-start.sh
14 if !(/usr/bin/hciconfig | grep hci); then
15 echo "Registering BT device is failed."
16 systemctl stop bluetooth-hci-logger.service
20 # We have to handle both systemd and sysvinit cases differently
21 if [ -d /sys/fs/cgroup/systemd ]; then
22 # bt-service changes USER to 'app' via libprivilege-control, so it needs
23 # to know where the session bus is located under systemd
24 export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/app/dbus/user_bus_socket
27 # Execute BlueZ BT stack
29 /usr/libexec/bluetooth/bluetoothd -d -C &
31 echo "Run bluetooth-share by systemd"
32 systemctl start --no-block bluetooth-share.service