click: broken for ages, moved to abandoned github feed
[packages.git] / net / linuxigd / files / upnpd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2012 OpenWrt.org
3 # Copyright (C) 2006 loswillios
4
5 START=65
6
7 start() {
8         . /lib/functions/network.sh
9
10         network_get_device wan_if 'wan' || return 1
11         network_get_device lan_if 'lan' || return 1
12
13         route add -net 239.0.0.0 netmask 255.0.0.0 $lan_if
14         service_start /usr/sbin/upnpd $wan_if $lan_if
15 }
16
17 stop() {
18         . /lib/functions/network.sh
19
20         service_stop /usr/sbin/upnpd
21
22         network_get_device lan_if 'lan' && \
23                 route del -net 239.0.0.0 netmask 255.0.0.0 $lan_if
24 }