3 # Released under the GPL
5 INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
9 if [ "$1" = "startup" ]; then
10 [ -f "$LOCK" ] && sudo /usr/sbin/hciconfig "$INTERFACE" up pscan 1>/dev/null && sudo /usr/sbin/bluetoothd || echo "Bluetooth: User has not enabled Bluetooth."
13 # Figure out if Bluetooth is running or not
15 if hciconfig "$INTERFACE" | grep UP &>/dev/null
17 notify-send -u normal "Bluetooth" "Bluetooth is being disabled..." -i blueman -t 5000
18 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
19 sudo /usr/pandora/scripts/op_bluetooth_work.sh 0
22 if ! sudo /usr/pandora/scripts/op_bluetooth_work.sh 1; then
23 notify-send -u normal "Bluetooth" "Bluetooth error" -i blueman -t 3000
30 notify-send -u normal "Bluetooth" "Bluetooth is being enabled..." -i blueman -t 5000
31 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
32 sudo /usr/sbin/hciconfig ${INTERFACE} up pscan 1>/dev/null
33 sudo /usr/sbin/bluetoothd 1>/dev/null