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