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."
14 # Figure out if Bluetooth is running or not
16 if hciconfig "$INTERFACE" | grep UP &>/dev/null
18 notify-send -u normal "Bluetooth" "Bluetooth is being disabled..." -i blueman -t 5000
19 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
25 notify-send -u normal "Bluetooth" "Bluetooth is being enabled..." -i blueman -t 5000
26 sudo /usr/sbin/hciconfig ${INTERFACE} down 1>/dev/null
27 sudo /usr/sbin/hciconfig ${INTERFACE} up pscan 1>/dev/null
28 sudo /usr/sbin/bluetoothd 1>/dev/null