⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 affix.rc.rh

📁 Affix - Bluetooth Protocol Stack for Linux has been developed at Nokia Research Center in Helsinki
💻 RH
字号:
#!/bin/sh## $Id: affix.rc.rh,v 1.10 2003/04/23 15:50:13 kds Exp $## affix           This shell script takes care of initializing device and #		  starting/stopping Affix bluetooth server.#		     # chkconfig: 235 45 96# description: Affix init script## Source function library.. /etc/rc.d/init.d/functionstest -f /etc/affix/affix.conf && . /etc/affix/affix.confBTSRV="${prefix}/bin/btsrv"BTSRV_ARGS=""BTCTL="${prefix}/bin/btctl"prog="btsrv"init() {	# Initialize device	if [ ! -f /var/lock/subsys/affixd ]; then		echo -n $"Initializing device: "		/etc/affix/affix start	        success && touch /var/lock/subsys/affixd	else		echo -n $"Device already initialized. "		failure	fi	echo}       deinit() {	# Stop Device	if [ -f /var/lock/subsys/affixd ]; then		echo -n $"Stopping Device: "		${BTCTL} down		sleep 2		/etc/affix/affix stop        	success && rm -f /var/lock/subsys/affixd	else		echo -n $"Device already stopped. "		failure	fi        echo}startbtsrv() {        if [ ! -f /var/lock/subsys/btsrv ]; then        echo -n $"Starting Affix Server: "       		$BTSRV $BTSRV_ARGS -d	        success && touch /var/lock/subsys/btsrv        else        	echo -n $"Affix Server already started. "	        failure        fi	echo}stopbtsrv() {        # Stop Affix Bluetooth Server        echo -n $"Stopping Services: "        if [ -f /var/lock/subsys/btsrv ]; then        	killall btsrv	        success && rm -f /var/lock/subsys/btsrv        else        	echo -n $"Affix Server already stopped. "	        failure        fi        echo}	start() {	init	test "$start_btsrv" = "yes" && startbtsrv}stop() {	if [ "$start_btsrv" = "yes" ] ; then		stopbtsrv		sleep 2 #give enough time to properly shutdown, so we can cleanly unload module	fi	deinit}# See how we were called.case "$1" in  start)  	start        ;;  stop)  	stop        ;;  restart)  	stop	start	;;  status)	status affixd	test "$start_btsrv" = "yes" && status btsrv	;;  *)        echo $"Usage: $0 {start|stop|restart|status}"esac

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -