upnpd.rc

来自「linuxigd」· RC 代码 · 共 94 行

RC
94
字号
#!/bin/bash##	/etc/rc.d/init.d/upnpd## Starts the upnpd daemon## chkconfig: 345 95 5# description: Internet Gateway Device# processname: upnpd# Source function library.. /etc/init.d/functions# defaultsALLOW_MULTICAST=no# Source configuration. /etc/sysconfig/upnpdUPNPD=/usr/sbin/upnpdtest -x "$UPNPD" || exit 0RETVAL=0##	See how we were called.#prog="upnpd"start() {	# Check if upnpd is already running	if [ ! -f /var/lock/subsys/upnpd ]; then	    echo -n $"Starting $prog: "	    [ "$ALLOW_MULTICAST" != "no" ] && route add -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE	    daemon "$UPNPD" $EXTIFACE $INTIFACE	    RETVAL=$?	    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/upnpd	    echo	fi	return $RETVAL}stop() {	echo -n $"Stopping $prog: "	killproc "$UPNPD"	RETVAL=$?	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/upnpd	[ "$ALLOW_MULTICAST" != "no" ] && route del -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE	echo        return $RETVAL}restart() {	stop	sleep 10	start}	reload() {	restart}	status_at() { 	status "$UPNPD"}case "$1" instart)	start	;;stop)	stop	;;reload|restart)	restart	;;condrestart)	if [ -f /var/lock/subsys/upnpd ]; then	    restart	fi	;;status)	status_at	;;*)	echo $"Usage: $0 {start|stop|restart|condrestart|status}"	exit 1esacexit $?

⌨️ 快捷键说明

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