3 # Released under the GPL
5 INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
8 if [ $1 = "startup" ]; then
9 [ -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
24 notify-send -u normal "Bluetooth" "Bluetooth is being enabled..." -i blueman -t 5000
25 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
26 sudo /usr/sbin/hciconfig ${INTERFACE} up pscan 1>/dev/null
27 sudo /usr/sbin/bluetoothd 1>/dev/null