8217fca3a6
- restart miniupnpd on hotplug event if it is enabled but not running - remove duplicate scan_interfaces git-svn-id: svn://svn.openwrt.org/openwrt/packages@13743 3c298f89-4303-0410-b956-a3cf2f4a3e73
19 lines
302 B
Bash
19 lines
302 B
Bash
#!/bin/sh
|
|
|
|
/etc/init.d/miniupnpd enabled && {
|
|
killall -0 miniupnpd 2>/dev/null && {
|
|
. /lib/miniupnpd/firewall.sh
|
|
|
|
[ "$ACTION" = "ifup" ] && {
|
|
upnp_firewall_delif
|
|
upnp_firewall_addif
|
|
}
|
|
|
|
[ "$ACTION" = "ifdown" ] && {
|
|
upnp_firewall_delif
|
|
}
|
|
} || {
|
|
/etc/init.d/miniupnpd restart
|
|
}
|
|
}
|