nat-start 308 B

12345678910111213
  1. #!/bin/sh
  2. CONFIG=1
  3. source /usr/sbin/helper.sh
  4. TUN="tun"
  5. for IFACE in $(ls /sys/class/net); do
  6. if [ "${IFACE:0:${#TUN}}" == "${TUN}" ]; then
  7. logger "Re-establish routing for ${IFACE}"
  8. /jffs/scripts/openvpn-event "${IFACE}" "" "" "" "" init
  9. /jffs/scripts/openvpn-event "${IFACE}" "" "" "" ""
  10. fi
  11. done