bash/for_smol/bt.sh

15 lines
228 B
Bash
Raw Normal View History

2023-02-14 18:22:28 +00:00
#!/bin/bash
power=$(bluetoothctl show | grep Powered)
echo "$power"
if [[ "$power" = " Powered: no" ]]
then
bluetoothctl power on
sleep 1
bluetoothctl connect 68:D6:ED:28:EB:D9
exit
else
bluetoothctl power off
exit
fi