packages/net/miniupnpd/files/miniupnpd.hotplug

19 lines
302 B
Plaintext
Raw Normal View History

#!/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
}
}