#!/bin/sh
# chkconfig: 2345 30 70
### BEGIN INIT INFO
# Provides:          bluetooth
# Required-Start:    modules dbus $local_fs
# Required-Stop:     
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start bluez at boot time
# Description:       Enable bluetooth daemon.
# X-Start-Before:    
# X-Stop-After:      
# X-Timesys-Start-Number:  30
# X-Timesys-Stop-Number:  70
### END INIT INFO


PATH=/usr/bin:/bin:/usr/sbin:/sbin
DAEMON=/usr/lib/bluetooth/bluetoothd

case "$1" in
    start)
        $DAEMON && \
          echo '[ OK ]' || echo '[FAIL]'
    ;;
    stop)
        killall $DAEMON
    ;;
    restart)
	$0 stop
	$0 start
    ;;
    *)
        echo "usage: $0 [ start | stop | restart ]"
    ;;
esac
