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.

27 lines
478 B

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