+++ /dev/null
-[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
[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
/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
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
/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