Hey. On Thu, 2013-01-03 at 22:41 -0500, Yaroslav Halchenko wrote: > but what about just adding a command to the client e.g. > > fail2ban-client touch logtarget > > which would be passed to the server to do the needed action (i.e. if > logging is done to a file): server.setLogTarget(server.getLogTarget())? > [syntax is the price of compatibility all the way to python 2.3 at some > point in the past ;-) ] > > care to work out a patch? I think with your idea from below,... this would even not be necessary...
> fail2ban-client get logtarget | sed -ne '$s/^[-` ]*//gp' Damn... I'm so blind... reading several times over these -client options and even get logtarget... but not realising that this was exactly what I wanted... So we could make something like your regexp to re-set the current logtarget. But another thing: Just because we make the postrotate phase dynamic... the lograte snippet still applies to /var/log/fail2ban.log only. So the only advantage would be that the user only needs to update the first line of the lograte config snippet. Neither would it solve the "problem" of useless rotation tries when e.g. SYSLOG is used. Cheers, Chris.
smime.p7s
Description: S/MIME cryptographic signature