6618259e1f
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6091 3c298f89-4303-0410-b956-a3cf2f4a3e73
30 lines
502 B
Bash
30 lines
502 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
# Copyright (C) 2006 loswillios
|
|
START=65
|
|
|
|
include /lib/network
|
|
scan_interfaces
|
|
config_get WAN 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
|
|
}
|