mirror of
https://github.com/SinTan1729/random.git
synced 2024-12-26 13:18: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
|
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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue