packages/net/miniupnpd/files/miniupnpd.iface.hotplug
jow a7b34e2b1e [packages] miniupnpd: restart daemon if internal iface is ifup'd
git-svn-id: svn://svn.openwrt.org/openwrt/packages@25593 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-02-19 19:11:11 +00:00

8 lines
224 B
Bash

#!/bin/sh
/etc/init.d/miniupnpd enabled && [ -n "`pidof miniupnpd`" ] && {
local intif="$(uci_get upnpd config internal_iface)"
[ "$ACTION" = "ifup" ] && [ "$INTERFACE" = "$intif" ] && \
/etc/init.d/miniupnpd restart
}