e39ddf3b6d
git-svn-id: svn://svn.openwrt.org/openwrt/packages@5653 3c298f89-4303-0410-b956-a3cf2f4a3e73
18 lines
572 B
Bash
18 lines
572 B
Bash
#!/bin/sh
|
|
upnpd_enabled=$(nvram get upnp_enabled)
|
|
if [ "$upnpd_enabled" = "1" ]; then
|
|
echo "miniupnpd starting ..."
|
|
iptables_flush.sh 2>&- >&-
|
|
killall miniupnpd 2>&-
|
|
iptables_removeall.sh 2>&- >&-
|
|
iptables_init.sh
|
|
upnpd_log=$(nvram get upnpd_log_output)
|
|
if [ "$upnpd_log" = "1" ]; then
|
|
miniupnpd -i $(nvram get wan_ifname) -a $(nvram get lan_ipaddr) -p 5000 -U -d | logger -t miniupnpd &
|
|
else
|
|
miniupnpd -i $(nvram get wan_ifname) -a $(nvram get lan_ipaddr) -p 5000 -U
|
|
fi
|
|
else
|
|
echo "miniupnpd service is disabled. Set nvram upnp_enabled to '1' to enable."
|
|
fi
|