base.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. module("trigger.base", package.seeall)
  2. require("uci.trigger")
  3. uci.trigger.add {
  4. {
  5. id = "dnsmasq_restart",
  6. title = "Restart dnsmasq",
  7. package = "dhcp",
  8. action = uci.trigger.service_restart("dnsmasq"),
  9. },
  10. {
  11. id = "dropbear_restart",
  12. title = "Restart dropbear",
  13. package = "dropbear",
  14. action = uci.trigger.service_restart("dropbear"),
  15. },
  16. {
  17. id = "fstab_restart",
  18. title = "Remount filesystems",
  19. package = "fstab",
  20. action = uci.trigger.service_restart("fstab"),
  21. },
  22. {
  23. id = "firewall_restart",
  24. title = "Reload firewall rules",
  25. package = "firewall",
  26. action = uci.trigger.service_restart("firewall"),
  27. },
  28. {
  29. id = "httpd_restart",
  30. title = "Restart the http server",
  31. package = "httpd",
  32. action = uci.trigger.service_restart("httpd")
  33. },
  34. {
  35. id = "led_restart",
  36. title = "Reload LED settings",
  37. package = "system",
  38. section = "led",
  39. action = uci.trigger.service_restart("led")
  40. },
  41. {
  42. id = "network_restart",
  43. title = "Restart networking and wireless",
  44. package = "network",
  45. action = uci.trigger.service_restart("network")
  46. },
  47. {
  48. id = "qos_restart",
  49. title = "Reload Quality of Service rules",
  50. package = "qos",
  51. action = uci.trigger.service_restart("qos"),
  52. },
  53. {
  54. id = "wireless_restart",
  55. title = "Restart all wireless interfaces",
  56. package = "wireless",
  57. section = { "wifi-device", "wifi-iface" },
  58. action = uci.trigger.system_command("wifi"),
  59. belongs_to = "network_restart"
  60. },
  61. }