#!/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 $? }