bluetooth.sh 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/usr/bin/env bash
  2. if command -v pveversion >/dev/null 2>&1; then echo -e "⚠️ Can't Run from the Proxmox Shell"; exit; fi
  3. set -e
  4. clear
  5. while true; do
  6. read -p "Start the Bluetooth Integration Preparation (y/n)?" yn
  7. case $yn in
  8. [Yy]*) break ;;
  9. [Nn]*) exit ;;
  10. *) echo "Please answer yes or no." ;;
  11. esac
  12. done
  13. clear
  14. cat <<"EOF"
  15. __ __ ___ _ __ __
  16. / / / /___ ____ ___ ___ / | __________(_)____/ /_____ _____ / /_
  17. / /_/ / __ \/ __ `__ \/ _ \ / /| | / ___/ ___/ / ___/ __/ __ `/ __ \/ __/
  18. / __ / /_/ / / / / / / __/ / ___ |(__ |__ ) (__ ) /_/ /_/ / / / / /_
  19. /_/ /_/\____/_/ /_/ /_/\___/ /_/ |_/____/____/_/____/\__/\__,_/_/ /_/\__/
  20. / __ )/ /_ _____ / /_____ ____ / /_/ /_
  21. / __ / / / / / _ \/ __/ __ \/ __ \/ __/ __ \
  22. / /_/ / / /_/ / __/ /_/ /_/ / /_/ / /_/ / / /
  23. /_____/_/\__,_/\___/\__/\____/\____/\__/_/_/_/_
  24. / _/___ / /____ ____ __________ _/ /_(_)___ ____
  25. / // __ \/ __/ _ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \
  26. _/ // / / / /_/ __/ /_/ / / / /_/ / /_/ / /_/ / / / /
  27. /___/_/_/_/\__/\___/\__, /_/ \__,_/\__/_/\____/_/ /_/
  28. / __ \________/____/ ____ __________ _/ /_(_)___ ____
  29. / /_/ / ___/ _ \/ __ \/ __ `/ ___/ __ `/ __/ / __ \/ __ \
  30. / ____/ / / __/ /_/ / /_/ / / / /_/ / /_/ / /_/ / / / /
  31. /_/ /_/ \___/ .___/\__,_/_/ \__,_/\__/_/\____/_/ /_/
  32. /_/
  33. EOF
  34. read -r -p "Switch from dbus-daemon to dbus-broker? <y/N> " prompt
  35. if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
  36. cat <<EOF >>/etc/apt/sources.list
  37. deb http://deb.debian.org/debian bullseye-backports main contrib non-free
  38. deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
  39. EOF
  40. apt-get update &>/dev/null
  41. apt-get -t bullseye-backports install -y dbus-broker &>/dev/null
  42. systemctl enable dbus-broker.service &>/dev/null
  43. fi
  44. read -r -p "Install BlueZ? <y/N> " prompt
  45. if [[ $prompt == "y" || $prompt == "Y" || $prompt == "yes" || $prompt == "Yes" ]]; then
  46. apt-get -t bullseye-backports install -y bluez* &>/dev/null
  47. fi
  48. echo -e "Finished, reboot for changes to take affect"