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:
parent
9301a586df
commit
78f0643183
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue