b2caa579a73babffdd1e397a30c06cbd1f8510ac
[project/luci.git] / applications / luci-statistics / luasrc / model / cbi / luci_statistics / email.lua
1 --[[
2
3 Luci configuration model for statistics - collectd email plugin configuration
4 (c) 2008 Freifunk Leipzig / Jo-Philipp Wich <xm@leipzig.freifunk.net>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13
14 ]]--
15
16 m = Map("luci_statistics")
17
18 -- collectd_email config section
19 s = m:section( NamedSection, "collectd_email", "luci_statistics" )
20
21 -- collectd_email.enable
22 enable = s:option( Flag, "enable" )
23 enable.default = 0
24
25 -- collectd_email.socketfile (SocketFile)
26 socketfile = s:option( Value, "SocketFile" )
27 socketfile.default = "/var/run/collect-email.sock"
28 socketfile:depends( "enable", 1 )
29
30 -- collectd_email.socketgroup (SocketGroup)
31 socketgroup = s:option( Value, "SocketGroup" )
32 socketgroup.default  = "nobody"
33 socketgroup.rmempty  = true
34 socketgroup.optional = true
35 socketgroup:depends( "enable", 1 )
36
37 -- collectd_email.socketperms (SocketPerms)
38 socketperms = s:option( Value, "SocketPerms" )
39 socketperms.default  = "0770"
40 socketperms.rmempty  = true
41 socketperms.optional = true
42 socketperms:depends( "enable", 1 )
43
44 -- collectd_email.maxconns (MaxConns)
45 maxconns = s:option( Value, "MaxConns" )
46 maxconns.default   = 5
47 maxconns.isinteger = true
48 maxconns.rmempty   = true
49 maxconns.optional  = true
50 maxconns:depends( "enable", 1 )
51
52 return m