3 # Source application-specific settings.
4 [ -f /etc
/conf.d
/upnpd
] && .
/etc
/conf.d
/upnpd
6 # Set defaults if settings are missing.
7 [ -z "$INTERNAL_INTERFACE" ] && INTERNAL_INTERFACE
="eth0"
8 [ -z "$EXTERNAL_INTERFACE" ] && EXTERNAL_INTERFACE
="ppp0"
9 [ -z "$ALLOW_MULTICAST" ] && ALLOW_MULTICAST
="yes"
14 PID
=`pidof -o %PPID /usr/sbin/upnpd`
17 stat_busy
"Starting UPnP Daemon"
18 if [ -z "$PID" ]; then
19 if [ "$ALLOW_MULTICAST" = "yes" ]; then
20 /sbin
/route add
-net 239.0.0.0 netmask
255.0.0.0 $INTERNAL_INTERFACE &> /dev
/null
22 /usr
/sbin
/upnpd
$EXTERNAL_INTERFACE $INTERNAL_INTERFACE
24 if [ ! -z "$PID" -o $?
-gt 0 ]; then
27 PID
=`pidof -o %PPID /usr/sbin/upnpd`
28 echo $PID > /var
/run
/upnpd.pid
34 stat_busy
"Stoping UPnP Daemon"
35 if [ ! -z "$PID" ]; then
36 if [ "$ALLOW_MULTICAST" = "yes" ]; then
37 /sbin
/route del
-net 239.0.0.0 netmask
255.0.0.0 $INTERNAL_INTERFACE &> /dev
/null
39 kill $PID &> /dev
/null
54 echo "usage: $0 {start|stop|restart}"