X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=scripts%2Fetc%2Fbt-stack-down.sh;h=d37eabe4773dfc46aed85da9d7af02202b1c9569;hb=2970a91edfb123c7fdc7bca36edbf11d2de2a565;hp=806f50fd6e48fa0739970bcd7316769167d308f1;hpb=ca15f0c3be5a79ebaae1ce99f1fc5e497d86933e;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-tools.git diff --git a/scripts/etc/bt-stack-down.sh b/scripts/etc/bt-stack-down.sh index 806f50f..d37eabe 100644 --- a/scripts/etc/bt-stack-down.sh +++ b/scripts/etc/bt-stack-down.sh @@ -1,5 +1,6 @@ #!/bin/sh PATH=/bin:/usr/bin:/sbin:/usr/sbin +PGREP=/usr/bin/pgrep # # Script for stopping Bluetooth stack @@ -9,13 +10,47 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin /usr/etc/bluetooth/bt-dev-end.sh # Kill BlueZ bluetooth stack -killall bluetooth -killall obexd obex-client -killall bluetooth-share -killall bluetooth-pb-agent -killall bluetooth-map-agent -killall bluetooth-hfp-agent -killall bluetoothd + +if ($PGREP bluetooth); then + BLUETOOTH_PID=$($PGREP bluetooth) + kill $BLUETOOTH_PID +fi + +if ($PGREP obexd); then + OBEXD_PID=$($PGREP obexd) + kill $OBEXD_PID +fi + +if ($PGREP obexd-client); then + OBEXDCLIENT_PID=$($PGREP obexd-client) + kill $OBEXDCLIENT_PID +fi + +if ($PGREP bluetooth-share); then + BTSHARE_PID=$($PGREP bluetooth-share) + kill $BTSHARE_PID +fi + +if ($PGREP bluetooth-pb-agent); then + BTPB_AGENT_PID=$($PGREP bluetooth-pb-agent) + kill $BTPB_AGENT_PID +fi + +if ($PGREP bluetooth-map-agent); then + BTMAP_AGENT_PID=$($PGREP bluetooth-map-agent) + kill $BTMAP_AGENT_PID +fi + +if ($PGREP bluetooth-hfp-agent); then + BTHFP_AGENT_PID=$($PGREP bluetooth-hfp-agent) + kill $BTHFP_AGENT_PID +fi + +if ($PGREP bluetoothd); then + BLUETOOTHD_PID=$($PGREP bluetoothd) + kill $BLUETOOTHD_PID +fi + # result exit 0