Add services for edutm mode 66/221766/1
authorDeokhyun Kim <dukan.kim@samsung.com>
Tue, 7 Jan 2020 09:34:04 +0000 (18:34 +0900)
committerDeokhyun Kim <dukan.kim@samsung.com>
Tue, 7 Jan 2020 09:34:04 +0000 (18:34 +0900)
Change-Id: I4adb97570b446b200e3891c95319aa36d469d110
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
packaging/bluetooth-edutm-off.service [new file with mode: 0644]
packaging/bluetooth-edutm-on.service [new file with mode: 0644]
scripts/bt-edutm-off.sh
scripts/bt-edutm-on.sh

diff --git a/packaging/bluetooth-edutm-off.service b/packaging/bluetooth-edutm-off.service
new file mode 100644 (file)
index 0000000..4458e79
--- /dev/null
@@ -0,0 +1,11 @@
+[Unit]
+Description=Bluetooth EDUTM off
+
+[Service]
+User=root
+Group=root
+Type=oneshot
+
+ExecStart=/usr/etc/bluetooth/bt-edutm-off.sh
+ExecStartPost=/usr/bin/systemctl stop bluetooth-edutm-on
+StandardOutput=journal+console
diff --git a/packaging/bluetooth-edutm-on.service b/packaging/bluetooth-edutm-on.service
new file mode 100644 (file)
index 0000000..70508dd
--- /dev/null
@@ -0,0 +1,12 @@
+[Unit]
+Description=Bluetooth EDUTM on
+
+[Service]
+User=root
+Group=root
+Type=oneshot
+
+ExecStart=/usr/etc/bluetooth/bt-edutm-on.sh
+RemainAfterExit=yes
+StandardOutput=journal+console
+StandardError=inherit
index ab4457f..af862e8 100755 (executable)
@@ -10,6 +10,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 # Remove BT device
 /usr/etc/bluetooth/bt-dev-end.sh
+/usr/etc/bluetooth/bt-run-hci-logger.sh normal stop
 
 # result
 exit 0
index c1959b5..288b733 100755 (executable)
@@ -12,6 +12,9 @@ HCIDUMP_PATH="${HCIDUMP_DIR}/${HCIDUMP_FILENAME}"
 LOGDUMP_DIR="/opt/etc/dump.d/module.d"
 LOGDUMP_PATH="${LOGDUMP_DIR}/bt-hci-logdump.sh"
 
+# Start HCI logging
+/usr/etc/bluetooth/bt-run-hci-logger.sh normal start btmon
+
 # Register BT Device
 /usr/etc/bluetooth/bt-dev-start.sh