mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@404 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
56 lines
1.0 KiB
Bash
56 lines
1.0 KiB
Bash
#!/bin/sh
|
|
########################################################################
|
|
# Begin $rc_base/init.d/
|
|
#
|
|
# Description : UPnP Starter
|
|
#
|
|
# Authors : Michael Tremer
|
|
#
|
|
# Version : 01.00
|
|
#
|
|
# Notes : for www.ipfire.org - GPLv2
|
|
#
|
|
########################################################################
|
|
|
|
. /etc/sysconfig/rc
|
|
. ${rc_functions}
|
|
|
|
# defaults
|
|
ALLOW_MULTICAST=no
|
|
|
|
# configuration
|
|
. /var/ipfire/upnp/settings
|
|
|
|
case "$1" in
|
|
start)
|
|
boot_mesg "Starting Universal Plug'n'Play daemon..."
|
|
loadproc /usr/sbin/upnpd $EXTIFACE $INTIFACE
|
|
evaluate_retval
|
|
[ "$ALLOW_MULTICAST" != "no" ] && route add -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE
|
|
;;
|
|
|
|
stop)
|
|
boot_mesg "Stopping Universal Plug'n'Play daemon..."
|
|
killproc /usr/sbin/upnpd
|
|
evaluate_retval
|
|
[ "$ALLOW_MULTICAST" != "no" ] && route del -net 239.0.0.0 netmask 255.0.0.0 $INTIFACE
|
|
;;
|
|
|
|
restart)
|
|
${0} stop
|
|
sleep 1
|
|
${0} start
|
|
|
|
;;
|
|
status)
|
|
statusproc
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: ${0} {start|stop|reload|restart|status}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# End $rc_base/init.d/
|