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.

47 lines
866 B

  1. #!/bin/sh /etc/rc.common
  2. #
  3. # Copyright (C) 2018 rosysong@rosinson.com
  4. #
  5. . /lib/nft-qos/core.sh
  6. . /lib/nft-qos/monitor.sh
  7. . /lib/nft-qos/dynamic.sh
  8. . /lib/nft-qos/static.sh
  9. . /lib/nft-qos/priority.sh
  10. START=99
  11. USE_PROCD=1
  12. service_triggers() {
  13. procd_add_reload_trigger nft-qos
  14. procd_open_validate
  15. qosdef_validate_dynamic
  16. qosdef_validate_static
  17. qosdef_validate_priority
  18. procd_close_validate
  19. }
  20. start_service() {
  21. config_load nft-qos
  22. qosdef_init_env
  23. qosdef_flush_static
  24. qosdef_flush_dynamic
  25. qosdef_remove_priority
  26. qosdef_init_header
  27. qosdef_init_monitor
  28. qosdef_validate_dynamic default qosdef_init_dynamic
  29. qosdef_validate_static default qosdef_init_static
  30. qosdef_validate_priority default qosdef_init_priority
  31. qosdef_init_done
  32. qosdef_start
  33. }
  34. stop_service() {
  35. qosdef_flush_dynamic
  36. qosdef_flush_static
  37. qosdef_remove_priority
  38. qosdef_clean_cache
  39. }