aboutsummaryrefslogtreecommitdiffstats
path: root/package/uci/trigger/modules
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-06-08 01:27:01 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-06-08 01:27:01 +0000
commite7cbce1f9e99ddf686bdef99574c0f62356b5a07 (patch)
tree16a309a2dc39312852cc467a8c7452b2ad96e488 /package/uci/trigger/modules
parent2cda2ff5752de60b39ced1e445364f76f5c13bdd (diff)
downloadupstream-e7cbce1f9e99ddf686bdef99574c0f62356b5a07.tar.gz
upstream-e7cbce1f9e99ddf686bdef99574c0f62356b5a07.tar.bz2
upstream-e7cbce1f9e99ddf686bdef99574c0f62356b5a07.zip
add ucitrigger: a uci plugin, command line tool and lua interface for automatically applying uci config changes
SVN-Revision: 16375
Diffstat (limited to 'package/uci/trigger/modules')
-rw-r--r--package/uci/trigger/modules/base.lua63
1 files changed, 63 insertions, 0 deletions
diff --git a/package/uci/trigger/modules/base.lua b/package/uci/trigger/modules/base.lua
new file mode 100644
index 0000000000..3ab6bba652
--- /dev/null
+++ b/package/uci/trigger/modules/base.lua
@@ -0,0 +1,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"
+ },
+}
+