1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-25 12:58:35 -06:00

fix: Do not turn on both after boot

This commit is contained in:
Sayantan Santra 2024-09-24 17:55:44 -05:00
parent 9301a586df
commit 78f0643183
Signed by: SinTan1729
GPG key ID: 0538DD402EA50898

View file

@ -11,7 +11,6 @@ if [ -z $DONGLE_MAC ]; then
DEVICE_MAC=$INTERNAL_MAC
else
DEVICE_MAC=$DONGLE_MAC
echo -e "select $INTERNAL_MAC\npower off" | bluetoothctl
fi
if [ $(bluetoothctl show $DEVICE_MAC | grep Powered | grep -c yes) == 1 ]; then
@ -22,3 +21,9 @@ else
fi
echo -e "select $DEVICE_MAC\npower on" | bluetoothctl
fi
if ! [ -z $DONGLE_MAC ]; then
sleep 0.5
echo -e "select $INTERNAL_MAC\npower off" | bluetoothctl
fi