improve bluetooth restart script

This commit is contained in:
shibao 2024-04-25 10:59:08 -04:00
parent 7cd05447e0
commit 743a51a846
1 changed files with 5 additions and 4 deletions

View File

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