Trust bluetooth devices before connecting
parent
ac3e2317f8
commit
12b1ad09f8
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
status="$(bluetoothctl info "$1" | grep Connected | cut -f 2 -d ':' | cut -f 2 -d ' ')"
|
status="$(bluetoothctl info "$1" | grep Connected | cut -f 2 -d ':' | cut -f 2 -d ' ')"
|
||||||
|
|
||||||
if [ "$status" == "no" ]
|
if [ "$status" == "yes" ]
|
||||||
then
|
|
||||||
bluetoothctl connect "$1"
|
|
||||||
elif [ "$status" == "yes" ]
|
|
||||||
then
|
then
|
||||||
bluetoothctl disconnect "$1"
|
bluetoothctl disconnect "$1"
|
||||||
|
else
|
||||||
|
trust "$1"
|
||||||
|
bluetoothctl connect "$1"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue