Open cedef opened 7 years ago
I think this is a good idea. How would you feel about making it Variant[Array[...], String] and then handling the string as a one-element array?
Absolutepath does not accept wildcards. It would be nice to accept them, but also check that the path with wildcard is valid.
And also to accept 'tail' as per the jail.conf manpage.
I very much appreciate your contributions to this module.
When specifying multiple files into the
logpath
jail directive in a jail.conf file, correct syntax is to split them with\n
(see man 5 jail.conf). I would really prefer using an Array instead of a very long String split with multiple\n
.Moreover, since v0.9.0 there is an optional
tail
orhead
directive that can follow a given path.So I think the fail2ban::jail defined type should take an Array as $log_path parameter:
I'm not 100% sure that Stdlib::Absolutepath would accept a wildcard in pathname, or anything like
/var/log/apache2/*.log tail
.What do you think about that ? I can submit a patch if you agree with the need to pass an Array as parameter. The patch would support both String and Array as $log_path parameter.
Regards,