3 # Released under the GPL
11 INTERFACE="`hciconfig | grep "^hci" | cut -d ':' -f 1`"
13 if [ ${1} = "startup" ]; then
14 [ -f ~/.op_btenabled ] && sudo /usr/sbin/hciconfig ${INTERFACE} up pscan && sudo /usr/sbin/bluetoothd ||echo "Bluetooth: User has not enabled Bluetooth."
17 # Figure out if Bluetooth is running or not
19 if [ "`hciconfig ${INTERFACE} | grep UP`" ]
21 notify-send -u normal "Bluetooth" "Bluetooth is being disabled..." -i /usr/share/icons/hicolor/32x32/apps/blueman.png
22 sudo /usr/sbin/hciconfig ${INTERFACE} down
28 notify-send -u normal "Bluetooth" "Bluetooth is being enabled..." -i /usr/share/icons/hicolor/32x32/apps/blueman.png
29 sudo /usr/sbin/hciconfig ${INTERFACE} down
30 sudo /usr/sbin/hciconfig ${INTERFACE} up pscan
31 sudo /usr/sbin/bluetoothd
33 echo true > ~/.op_btenabled