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.

28 lines
513 B

  1. #!/bin/sh
  2. [ -f "/etc/mwan3.user" ] && {
  3. . /lib/functions.sh
  4. . /lib/mwan3/mwan3.sh
  5. mwan3_lock "$ACTION" "user"
  6. config_load mwan3
  7. config_get_bool enabled globals 'enabled' '0'
  8. [ "${enabled}" -gt 0 ] || {
  9. mwan3_unlock "$ACTION" "user"
  10. exit 0
  11. }
  12. config_get_bool enabled "$INTERFACE" enabled 0
  13. [ "${enabled}" -eq 1 ] || {
  14. mwan3_unlock "$ACTION" "user"
  15. exit 0
  16. }
  17. mwan3_unlock "$ACTION" "user"
  18. env -i ACTION="$ACTION" INTERFACE="$INTERFACE" DEVICE="$DEVICE" \
  19. /bin/sh /etc/mwan3.user
  20. }
  21. exit 0