MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/etc/rc6.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/etc/rc6.d/K90bluetooth
#!/bin/sh
#
# bluetooth:	Start/stop bluetooth services
#
# chkconfig:	2345 25 90
# description:	Bluetooth services for service discovery, authentication, \
#		Human Interface Devices, etc.
#


# Source function library.
. /etc/rc.d/init.d/functions


UART_CONF="/etc/bluetooth/uart"

[ -e /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth

start_uarts()
{
	[ -f $UART_CONF ] || return
	grep -v '^#' $UART_CONF | while read i; do
		/usr/sbin/hciattach $i
	done
}

stop_uarts()
{
	killproc hciattach > /dev/null 2>&1
}

start()
{
	echo -n $"Starting Bluetooth services:"
	daemon /usr/sbin/hcid
	daemon sdpd
	[ "$HID2HCI_ENABLE" = "true" ] && hid2hci --tohci > /dev/null 2>&1 || :
	start_uarts
	rfcomm bind all
	touch /var/lock/subsys/bluetooth
	echo ""
}

stop()
{
	echo -n "Stopping Bluetooth services:"
	stop_uarts
	rfcomm release all
	[ "$HID2HCI_UNDO" = "true" ] && hid2hci --tohid > /dev/null 2>&1 || :
	killproc sdpd
	killproc hcid
	rm -f /var/lock/subsys/bluetooth
	echo ""
}

case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
        stop
        start
        ;;
  condrestart)
        [ -e /var/lock/subsys/bluetooth ] && (stop; start)
        ;;
  status)
        status hcid
        status sdpd
        ;;
  *)
        echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
        exit 1
	;;
esac

exit 0

Anon7 - 2021