Scripts/status: check if bluetooth controllers are even available
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
controller=$(bluetoothctl list)
|
||||
devices=$(bluetoothctl devices Connected | awk '{print $2}')
|
||||
|
||||
if [ -z "$devices" ]
|
||||
if [ -z "$devices" ] || [ -z "$controller" ]
|
||||
then
|
||||
echo ''
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user