-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Use hotplug to trigger tasks like that, example:

# /etc/hotplug.d/iface/90-upnpc:

. /lib/functions/network.sh

if [ "$ACTION" = ifup ] && [ "$INTERFACE" != lo ]; then
        local ipaddr
        network_get_ipaddr ipaddr "$INTERFACE" || exit 0

        logger -t 90-upnpc "Adding port forward 1234 to address $ipaddr"
        /usr/bin/upnpc -a "$ipaddr" 1234 1234 tcp
fi


~ Jow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDBx6AACgkQdputYINPTPPWigCeM4YnlVL0+tPXRP/PLg9OiLKE
tKwAnArwH+FAFJIha2ikSynGOgcc+AU1
=4rsT
-----END PGP SIGNATURE-----
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-users

Reply via email to