improve bluetooth restart script

This commit is contained in:
shibao 2024-04-25 10:59:08 -04:00
parent 6a242b158e
commit 1f800423ec

View File

@ -1,12 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -euo pipefail set -euox pipefail
pkill -f blueman-manager || true
echo stopping bluetooth... echo stopping bluetooth...
sudo systemctl stop bluetooth-autoconnect
sudo systemctl stop bluetooth sudo systemctl stop bluetooth
sudo rmmod btusb sudo modprobe -r btusb
echo starting bluetooth... echo starting bluetooth...
sudo modprobe btusb sudo modprobe btusb
sudo systemctl start bluetooth sudo systemctl start bluetooth
sudo systemctl start bluetooth-autoconnect sudo rfkill unblock bluetooth