3 Parses ClamAV clamd and freshclam configuration files.
5 Author: Andrew Colin Kissa <andrew@topdog.za.net>
6 Baruwa Enterprise Edition http://www.baruwa.com
9 This file is licensed under the LGPL v2+.
11 About: Configuration files
12 This lens applies to /etc/clamd.conf, /etc/freshclam.conf and files in
13 /etc/clamd.d. See <filter>.
19 (************************************************************************
20 * Group: USEFUL PRIMITIVES
21 ************************************************************************)
23 let word = /[A-Za-z][A-Za-z0-9]+/
25 let comment = Util.comment
27 let some_value = Sep.space . store Rx.space_in
29 (************************************************************************
31 ************************************************************************)
33 let example_entry = [ key "Example" . Util.eol ]
35 let clamd_entry = [ key word . some_value . Util.eol ]
37 (******************************************************************
38 * Group: LENS AND FILTER
39 ******************************************************************)
41 (************************************************************************
43 ************************************************************************)
45 let lns = (Util.empty | example_entry | clamd_entry | comment )*
47 (* Variable: filter *)
48 let filter = (incl "/etc/clamd.conf")
49 . (incl "/etc/freshclam.conf")
50 . (incl "/etc/clamd.d/*.conf")
52 let xfm = transform lns filter