X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=scripts%2Fetc%2Fbt-stack-down.sh;h=a7b6071e98e494fc0252bd6ed1b5a671de6a8e43;hb=63a5ba36eaf5a25b5a487320f34e9a9d18ae611e;hp=d37eabe4773dfc46aed85da9d7af02202b1c9569;hpb=5b364b7c6e5b6ea76ae7d3a9ff6c374626ca9ea8;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-tools.git diff --git a/scripts/etc/bt-stack-down.sh b/scripts/etc/bt-stack-down.sh index d37eabe..a7b6071 100644 --- a/scripts/etc/bt-stack-down.sh +++ b/scripts/etc/bt-stack-down.sh @@ -11,43 +11,43 @@ PGREP=/usr/bin/pgrep # Kill BlueZ bluetooth stack -if ($PGREP bluetooth); then - BLUETOOTH_PID=$($PGREP bluetooth) +BLUETOOTH_PID=$($PGREP bluetooth) +if [ "$BLUETOOTH_PID" != "" ]; then kill $BLUETOOTH_PID fi -if ($PGREP obexd); then - OBEXD_PID=$($PGREP obexd) +OBEXD_PID=$($PGREP obexd) +if [ "$OBEXD_PID" != "" ]; then kill $OBEXD_PID fi -if ($PGREP obexd-client); then - OBEXDCLIENT_PID=$($PGREP obexd-client) +OBEXDCLIENT_PID=$($PGREP obexd-client) +if [ "$OBEXDCLIENT_PID" != "" ]; then kill $OBEXDCLIENT_PID fi -if ($PGREP bluetooth-share); then - BTSHARE_PID=$($PGREP bluetooth-share) +BTSHARE_PID=$($PGREP bluetooth-share) +if [ "$BTSHARE_PID" != "" ]; then kill $BTSHARE_PID fi -if ($PGREP bluetooth-pb-agent); then - BTPB_AGENT_PID=$($PGREP bluetooth-pb-agent) +BTPB_AGENT_PID=$($PGREP bluetooth-pb-agent) +if [ "$BTPB_AGENT_PID" != "" ]; then kill $BTPB_AGENT_PID fi -if ($PGREP bluetooth-map-agent); then - BTMAP_AGENT_PID=$($PGREP bluetooth-map-agent) +BTMAP_AGENT_PID=$($PGREP bluetooth-map-agent) +if [ "$BTMAP_AGENT_PID" != "" ]; then kill $BTMAP_AGENT_PID fi -if ($PGREP bluetooth-hfp-agent); then - BTHFP_AGENT_PID=$($PGREP bluetooth-hfp-agent) +BTHFP_AGENT_PID=$($PGREP bluetooth-hfp-agent) +if [ "$BTHFP_AGENT_PID" != "" ]; then kill $BTHFP_AGENT_PID fi -if ($PGREP bluetoothd); then - BLUETOOTHD_PID=$($PGREP bluetoothd) +BLUETOOTHD_PID=$($PGREP bluetoothd) +if [ "$BLUETOOTHD_PID" != "" ]; then kill $BLUETOOTHD_PID fi