Fix memory crash issue
[platform/core/connectivity/bluetooth-frwk.git] / bluetooth_log_dump.sh
1 #!/bin/sh
2
3 #--------------------------------------
4 #    bluetooth
5 #--------------------------------------
6
7 BLUETOOTH_DEBUG=${1}/bluetooth
8 PREV_PWD=${PWD}
9 BT_DATA_DIR=/var/lib/bluetooth
10
11 /bin/mkdir -p ${BLUETOOTH_DEBUG}
12 /bin/chmod g+w ${BLUETOOTH_DEBUG}
13
14 if [ -e ${BT_DATA_DIR} ]
15 then
16         cd ${BT_DATA_DIR}
17         /bin/tar -cvzf ${BLUETOOTH_DEBUG}/bt_log.tar.gz *
18 fi
19
20 cd ${PREV_PWD}