add some indirection around make targets of module.mk, so you can combine it more...
[project/luci.git] / applications / luci-statistics / src / model / cbi / luci_statistics / unixsock.lua
1 --[[
2
3 Luci configuration model for statistics - collectd unixsock 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", "Unixsock Plugin",
17 [[Das Unixsock-Plugin öffnet einen Socket über welchen die gesammelten Werte des
18 laufenden collectd Prozesses abgefragt werden können.]])
19
20 -- collectd_unixsock config section
21 s = m:section( NamedSection, "collectd_unixsock", "luci_statistics", "Pluginkonfiguration" )
22
23 -- collectd_unixsock.enable
24 enable = s:option( Flag, "enable", "Plugin aktivieren" )
25 enable.default = 0
26
27 -- collectd_unixsock.socketfile (SocketFile)
28 socketfile = s:option( Value, "SocketFile", "Pfad für den Unix-Socket" )
29 socketfile.default = "/var/run/collect-query.socket"
30 socketfile:depends( "enable", 1 )
31
32 -- collectd_unixsock.socketgroup (SocketGroup)
33 socketgroup = s:option( Value, "SocketGroup", "Dateibesitzergruppe für den Unix-Socket ändern" )
34 socketgroup.default  = "nobody"
35 socketgroup.rmempty  = true
36 socketgroup.optional = true
37 socketgroup:depends( "enable", 1 )
38
39 -- collectd_unixsock.socketperms (SocketPerms)
40 socketperms = s:option( Value, "SocketPerms", "Dateiberechtigungen für den Unix-Socket ändern" )
41 socketperms.default  = "0770"
42 socketperms.rmempty  = true
43 socketperms.optional = true
44 socketperms:depends( "enable", 1 )
45
46 return m