You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
424 B

  1. #!/bin/sh
  2. . /lib/functions.sh
  3. . /lib/functions/network.sh
  4. . /lib/mwan3/mwan3.sh
  5. config_load mwan3
  6. config_get_bool enabled globals 'enabled' '0'
  7. [ ${enabled} -gt 0 ] || exit 0
  8. if [ "$ACTION" == "ifup" ]; then
  9. mwan3_lock "$ACTION" "mwan3rtmon"
  10. mwan3_rtmon
  11. mwan3_unlock "$ACTION" "mwan3rtmon"
  12. fi
  13. config_get enabled $INTERFACE enabled 0
  14. [ "${enabled}" = "0" ] || {
  15. mwan3_flush_conntrack "$INTERFACE" "$ACTION"
  16. }
  17. exit 0