packages/net/linuxigd/files/upnpd.init
nico 6618259e1f add a custom configuration file (from: #1180), remove trivial comments from init script
git-svn-id: svn://svn.openwrt.org/openwrt/packages@6091 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-01-13 23:12:25 +00:00

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
}