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

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