pandora-scripts: Add a few more scripts. Bluetooth one needs more work.
[openpandora.oe.git] / recipes / pandora-system / pandora-scripts / op_bluetooth.sh
1 #!/bin/sh
2 #
3 # Released under the GPL
4
5 SILENT=0
6 while getopts s opt
7 do
8         case "$opt" in
9                 s) SILENT=1;;
10         esac
11 done
12
13 INTERFACE=`hciconfig | grep "^hci" | cut -d ':' -f 1`
14 pgrep bluetoothd
15 if [ $? = 1 ]; then
16         notify-send "Bluetooth" "The bluetooth interface is being set up..." -i /usr/share/icons/hicolor/32x32/apps/blueman.png
17         sudo /usr/sbin/hciconfig ${INTERFACE} down
18         sudo /usr/sbin/hciconfig ${INTERFACE} up pscan
19         sudo /usr/sbin/bluetoothd
20 fi
21
22 if [ ${SILENT} = 0 ]; then
23         bluetooth-wizard
24 fi