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