summaryrefslogtreecommitdiffstats
path: root/package/uci/trigger/modules/base.lua
blob: 3ab6bba652ac934bd0b7ac7f6836b92822dca36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
module("trigger.base", package.seeall)
require("uci.trigger")

uci.trigger.add {
	{
		id = "dnsmasq_restart",
		title = "Restart dnsmasq",
		package = "dhcp",
		action = uci.trigger.service_restart("dnsmasq"),
	},
	{
		id = "dropbear_restart",
		title = "Restart dropbear",
		package = "dropbear",
		action = uci.trigger.service_restart("dropbear"),
	},
	{
		id = "fstab_restart",
		title = "Remount filesystems",
		package = "fstab",
		action = uci.trigger.service_restart("fstab"),
	},
	{
		id = "firewall_restart",
		title = "Reload firewall rules",
		package = "firewall",
		action = uci.trigger.service_restart("firewall"),
	},
	{
		id = "httpd_restart",
		title = "Restart the http server",
		package = "httpd",
		action = uci.trigger.service_restart("httpd")
	},
	{
		id = "led_restart",
		title = "Reload LED settings",
		package = "system",
		section = "led",
		action = uci.trigger.service_restart("led")
	},
	{
		id = "network_restart",
		title = "Restart networking and wireless",
		package = "network",
		action = uci.trigger.service_restart("network")
	},
	{
		id = "qos_restart",
		title = "Reload Quality of Service rules",
		package = "qos",
		action = uci.trigger.service_restart("qos"),
	},
	{
		id = "wireless_restart",
		title = "Restart all wireless interfaces",
		package = "wireless",
		section = { "wifi-device", "wifi-iface" },
		action = uci.trigger.system_command("wifi"),
		belongs_to = "network_restart"
	},
}