packages/net/miniupnpd/files/miniupnpd.hotplug
jow 8217fca3a6 miniupnpd:
- 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
2008-12-25 03:46:04 +00:00

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
}
}