blob: 36f2e42c1cc817bf80d9a533769ad6736baea61a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#!/sbin/runscript
depend() {
need net
}
checkconfig() {
source /etc/linuxigd/upnpd.conf
if [ "$INTERFACE" = "" -o "$OUTERFACE" = "" ] ; then
ewarn "You need to configure upnpd in /etc/linuxigd/upnpd.conf"
return 1
fi
return 0
}
start() {
checkconfig || exit
ebegin "Starting upnpd"
/sbin/route add -net 239.0.0.0 netmask 255.0.0.0 $INTERFACE
start-stop-daemon --start \
--exec /usr/bin/upnpd -- $OUTERFACE $INTERFACE
eend $?
}
stop() {
ebegin "Stopping upnpd"
/sbin/route del -net 239.0.0.0 netmask 255.0.0.0 $INTERFACE
start-stop-daemon --stop --exec /usr/bin/upnpd
eend $?
}
|