add linux-igd (closes: #1180)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6058 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
33
net/linuxigd/files/upnpd.init
Normal file
33
net/linuxigd/files/upnpd.init
Normal file
@ -0,0 +1,33 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
# Copyright (C) 2006 loswillios
|
||||
START=65
|
||||
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
|
||||
# $WAN contains WAN ifname
|
||||
config_get WAN wan ifname
|
||||
|
||||
# $LAN contains WAN ifname
|
||||
config_get LAN lan ifname
|
||||
|
||||
start() {
|
||||
echo -n "Starting UPnP: "
|
||||
route add -net 239.0.0.0 netmask 255.0.0.0 $LAN
|
||||
upnpd $WAN $LAN
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping UPnP: "
|
||||
route del -net 239.0.0.0 netmask 255.0.0.0 $LAN
|
||||
killall upnpd
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 5
|
||||
start
|
||||
}
|
Reference in New Issue
Block a user