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
657 B

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