November 29th, 2005, 12:37 PM
Log Rotation Problem (FreeBSD 5.4)
My logrotate is not recreating the original log file even though I have that set as the default.
Here is the config file:
When I force rotation the wtmp file (viewable via last) is replaced with wtmp.1.bz2. That part is good.
What's not good is that the wtmp file is not recreated which means "last" does not work properly thereafter.
I suppose as a post rotate command I can touch the.log but i would have to do that for each rotation entry which is a pain in the arse.
Does anyone have a solution or any ideas?
Does anyone know if there is a variable i can pass to the post rotate command (for instance: touch $this_file) that i can use as a global default which will recreate the appropriate log file for each rotation?
November 29th, 2005, 01:22 PM
Add "create" to your default options.